Countless of times I've heard and read that RAM-memory can have different speeds – denoted as MHz (e.g. 1066 MHz). However, what this frequency really is has never been explained to me and I'm having trouble finding an answer. My best guess is that – since frequency basically means "how many times per second" – the MHz means how many times per second the RAM can communicate with the CPU. Please do correct me if I am wrong. Also: how can you put this in a relationship to the size of the data being processed per second? E.g. how much data in mega-/kilobytes are sent to the CPU from the RAM per second in a scenario where its being pushed to the limit?
What does the MHz of RAM really mean
cpumemoryspeed
Related Solutions
Ah, this is one of those simple questions that have really complex answers. The simple answer is, well, it depends on how the write was done and what sort of caching there is. Here's a useful primer on how caches work.
CPUs can write data in various ways. Without any caching, the data is stored in memory straightaway and the CPU waits for the write to complete. With caching, the CPU usually stores data in program order, i.e. if the program writes to address A then address B then the memory A will be written to before memory B, regardless of the caching. The caching only affects when the physical memory is updated, and this depends on the type of caching used (see the above link). Some CPUs can also store data non-temporally, that is, the writes can be re-ordered to make the most of memory bandwidth. So, writing to A, then B, then (A+1) could be reorderd to writing to A then A+1 in a single burst, then B.
Another complication is when more than one CPU is present. Depending on the way the system is designed, writes by one CPU won't be seen by other CPUs because the data is still in the first CPUs cache (the cache is dirty). In multiple CPU systems, making each CPU's cache match what is in physical memory is termed cache consistancy. There are various ways this can be acheived.
Of course, the above is geared towards Pentium processors. Other processors can do things in other ways. Take, for example, the PS3's Cell processor. The basic architecture of a Cell CPU is one PowerPC core with several Cell cores (on the PS3 there are eight cells one of which is always disabled to improve yields). Each cell has its own local memory, sort of an L1 cache which is never written to system RAM. Data can be transferred between this local RAM and system RAM using DMA (Direct Memory Access) transfers. The cell can access system RAM and the RAM of other cells using what appears to be normal reads and writes but this just triggers a DMA transfer (so it's slow and really should be avoided). The idea behind this system is that the game is not just one program, but many smaller programs that combine to do the same thing (if you know *nix then it's like piping command line programs to achieve more complex tasks).
To sum up, writing to RAM used to be really simple in the days when CPU speed matched RAM speed, but as CPU speed increased and caches were introduced, the process became more complex with many different methods.
Skizz
The CPU processes (performs instructions on things, such as adding) stuff in memory. RAM is just part of the memory pyramid (see below). So when you are processing lots of data, that data ( or maybe large portions of it) will likely get loaded into RAM so it is ready for the cpu, this is to speed things up because RAM is faster to access than storage devices. So CPU usage and RAM can often correlate, but don't have to.
A basic example might be an image editing program. I load up my 20MB jpeg, the program reads the entire image, and the OS keeps that in RAM for you (all working memory looks the same to the program, the OS decides if it goes to the page/swap file on disk or RAM). So the image is in RAM waiting to be processed, but I go for coffee before telling the program to apply some silly filter, so the CPU isn't doing anything: high RAM low CPU.
I come back, apply the filter to add some bubbles to the image, and the CPU goes to 100% and even more memory gets used because it keeps the preprocessed image in memory, so I can undo the change I just made. High RAM, high CPU.
When the program is done adding the bubbles, the CPU drops, but maybe not the memory.
Of course, it isn't quite this simple :-)
Best Answer
Yes, it's the maximum number of clock cycles per second that the RAM operates on. With Double Data Rate (DDR) RAM, it actually communicates twice per cycle. So for DDR:
200 MHz clock rate × 2 (for DDR, 1 for SDR) × 8 Bytes = 3,200 MB/s bandwidth
This is why chips are now named for their bandwidth, not their frequency alone. Above chip module is called PC-3200, not 200 Mhz. It's still necessary to know the clock rate, to ensure that the motherboard/CPU can operate at that clock.
See the Wikipedia article on DDR SDRAM for more information.