Thinking of a computer as a single, indivisible unit is usually the most natural thing for the average user, but behind the scenes we find a long list of highly complex systems and resources working together to ensure maximum performance. One of the most important is cache memory, present in processors, hard drives, solid-state drives, and other components. Do you want to know what cache memory is and how it works? Keep reading.
Speed!
Faster. Everything must run faster, take less time, anticipate the user. Our demands have been increasing over the years, and if there is a performance problem, we throw more hardware at it. MS-DOS 6.22 hit shelves between April and June 1994, and from that moment on we began to leave behind the famous 640 KB base memory. Today, a computer needs 8 gigabytes of memory as an absolute minimum, and 16 GB are already recommended for almost all environments.
But adding more cores or memory doesn't tell the whole story. There are other very important players that can dramatically increase performance, or leave a system on its knees with their absence. The case of cache memory is one of the most cited. What is cache memory and how does it work?
What is cache memory?
In loose terms, cache memory is a type of temporary memory that stores data to deliver it to the user faster in the future. I imagine you have seen it in action: for example, if you open a program, close it, and immediately reopen it, you'll notice that the second load is much faster thanks to the intervention of cache memory, and RAM in general. The idea is to reduce access times. If you constantly read and execute the same files, why read them from the storage drive or slower memory when a pinch of cache can speed up the whole process? Another interesting aspect is that cache memory exists as a software and/or hardware solution. Not to go too far, the classic SuperFetch (now SysMain) uses system RAM as a giant cache to preload applications, and on the hardware side, we have things like processor cache and DRAM cache on SSDs.
Cache in the CPU
The processor stands out for having different levels of cache memory. A very large cache has an excellent hit rate, but pays the price with additional latency. The multiple cache levels seek to compensate for that, starting with small but extremely fast caches, followed by slower caches.
This configuration allows cores to process data faster and, as much as possible, avoid the bottleneck of general memory access. That problem is much older than we think: all arrows point to Sir Maurice Vincent Wilkes, a British scientist from the University of Cambridge, as the inventor of the cache memory concept in 1965, dubbed slave memory at the time.
A relatively modern processor like the Intel Core i7-10700F has three levels of cache: L1 divided into 8 x 32 KB for data and another 8 x 32 KB for instructions, an L2 cache of 8 x 256 KB, and finally a shared L3 cache across all cores, totaling 16 megabytes. Now, this wasn't always the case: old 486 and Pentium only offered L1 cache, and to access L2 cache, we had to rely on the motherboard, with integrated chips or an expansion socket.
Historical and current cases
How important is cache memory in processors? The original Celeron is a strong example: Intel decided to launch it as a low-cost option by cutting L2 cache, and the result was an anemic CPU that we had to overclock to the limit to get something decent from it. Soon after, the Celeron 300A "Mendocino" debuted with 128 KB of integrated L2 cache. Those 128 kilobytes were more than enough to double the performance of the previous chip and turn the Celeron 300A into one of the best processors in the history of overclocking.
Evaluating its impact on modern processors is more complicated, but not impossible. In fact, the folks at Hardware Unboxed published an excellent video comparing the increase in L3 cache under the same core and thread count. In essence, the Intel Core i9-10900K (10C/20T), Core i7-10700K (8C/16T), and Core i5-10600K (6C/12T) were forced to work with the same configuration as the Core i3-10105F (4C/8T). The difference in L3 cache size establishes some advantage for the higher chips, however, the benefit doesn't extend to all games.
(Editor's note: Video in English, but the tables are the most important)
What is cache memory: In summary
Cache memory is a shortcut, a supplement that helps us access all those frequently used data more quickly and efficiently. Having more is better, but its structure must be correct. Want to know more about cache memory? The HWiNFO summary (which also serves to measure temperature and voltages on your PC) will present all the information about your processor, this updated list reveals SSD models with integrated DRAM cache, and if you have doubts about SuperFetch on your system, you can always disable it. Good luck!