Memory

It is difficult to exaggerate the time difference between accessing memory and accessing disk. Although in human terms there is little perceptible difference between a single 100 nanosecond access of RAM and a single 100 millisecond access of hard disk, there is literally a factor of one million between them. The perceptible difference comes in repeated access, when the value of having enough memory quickly becomes clear.

RAM Characteristics

Most physical chip memory these days is Dynamic Random Access Memory (DRAM). Random access refers to the fact that you can access any location on the memory chip with equal speed. Dynamic refers to the fact that the memory is repeatedly being refreshed because the charge on each individual cell is constantly leaking away. DRAM was invented during the 1980s when it was realized that memories could be made much denser by storing a bit on a single transistor rather than on a set of transistors, with the caveat that the entire chip would have to be constantly refreshed because of the charge leakage problem. The older kind of memory is now referred to as Static Random Access Memory (SRAM). SRAM uses flip flops, sets of four or five transistors that keep state by refreshing each other. SRAM is more expensive and not as dense as DRAM, but has far faster access time, on the order of 20 nanoseconds rather than 80 nanoseconds for DRAM. SRAM is used for L2 caches. DRAM has dropped a lot in price recently. You should be able to find commodity DRAM ...

Get Web Performance Tuning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.