In the eighties, computer processors became faster and faster, while memory access times stagnated and hindered additional performance increases. Something had to be done to speed up memory access and make the whole system work more efficiently.
The discrepancy between computational and memory speed ultimately led to the development of processor cache. Basically, the cache is a fast type of memory. It contains a small area of memory with the instructions that the computer will most likely need next if it is to perform certain tasks.
The system loads this information into the cache using complex algorithms. The main purpose of a cache system is to ensure that the processor has immediate and instant access to the data it needs in the right order.
Further reading: The best CPUs for gaming
To understand how they work, you first need to know that PCs work with three different types of memory: The first is the primary memory in the form of a hard disk (HDD) or SSD (Solid State Disk). This is the memory with the largest capacity. Then comes the main memory (RAM), which is a lot faster, but also smaller than the primary memory.
Last but not least, there is also memory within the processor — the cache. It is the type of memory that works the fastest. As soon as a program starts, it executes a series of commands that can be found in the software’s code. The program first loads these commands into RAM, from where they are transferred to the CPU. For the best possible execution of these instructions, the processor needs very fast memory. This is where the cache comes into play.
The cache is a temporary data store located directly on the processor. It is used to increase the processing efficiency of the processor by holding frequently requested bits of data ready to be retrieved at high speed.
Cache memory consists of different levels called L1, L2, L3 and occasionally L4, which differ in location, speed and size. The cache memory is extremely fast and positioned as close as possible to the processor cores. Modern, fast CPUs are not slowed down by requests for data from the relatively slow system memory (RAM). Instead, they can retrieve the data from the cache.
The L1 cache, also called the primary cache, is the smallest and fastest memory level. It is usually 64 KB per core, so that a quad-core CPU, for example, has a total of 256 KB.
AMD
The L2 cache is the secondary memory cache that is also embedded in each individual core of the CPU. It almost always has more memory than the L1 cache, but operates at a slower speed, although still significantly faster than main system memory. Some high-end processors can have a total of 32 MB of L2 cache, but 6 to 12 MB is the average.
Now for the third cache: Unlike the L1 and L2 caches embedded in each CPU core, the L3 cache serves as a shared memory pool that can be accessed by the entire processor. It is much slower than the L1 and L2 cache levels — and usually only twice as fast as RAM. At the same time, it is the largest of all three memory levels. If the CPU cannot find the data it needs in the cache memory, it must request the data from the slower system memory instead. This is called a cache miss.
On the question of whether the cache can be cleared manually: Basically, there are memory caches that can be cleared or flushed, such as the system cache or the browser cache. However, you cannot actively delete the CPU cache memory. The reason: It is a volatile memory. This means that it does not retain its contents in the long term.
As soon as you switch off the computer, the content in your processor’s cache memory is lost. As with most types of memory, the more cache a CPU offers, the better. You can’t upgrade cache memory, so it’s important that the processor you choose has enough memory available.
But that depends on what you do with your computer. At the same time, you should not focus too much on this one CPU feature. Clock speeds, the number of cores as well as threads and other factors influence CPU performance more.
Intel
A good base for the L1 cache is 64 KB per core. You can find this out by dividing the total amount by the number of cores in the CPU. A 256 KB L2 cache per core is perfectly acceptable, but gamers might benefit from 512 KB per core. And anything between 32 and 96 MB of L3 cache is perfectly fine for most purposes.
In summary, cache memory is an indispensable part of modern CPUs. Although the differences between L1, L2, and L3 seem complex at first glance, they help to maximize the efficiency and performance of a computer. If you are in the process of purchasing a CPU, it is advisable to consider cache as an important aspect of the processor architecture.
This article was translated from German to English and originally appeared on pcwelt.de.
Author: Kim Beard PhD
Last Updated: 1698558242
Views: 1289
Rating: 4.2 / 5 (41 voted)
Reviews: 81% of readers found this page helpful
Name: Kim Beard PhD
Birthday: 1957-07-08
Address: PSC 1820, Box 6916, APO AP 09726
Phone: +4248363181339868
Job: Biomedical Engineer
Hobby: Bird Watching, Beekeeping, Dancing, Telescope Building, Card Games, Origami, Stamp Collecting
Introduction: My name is Kim Beard PhD, I am a unyielding, dear, proficient, persistent, priceless, strong-willed, steadfast person who loves writing and wants to share my knowledge and understanding with you.