Cache Features
We learned that cache is a small storage container (chip) that the CPU uses to store some frequently used variables and data. The CPU accesses data in cache much faster than accessing data in main memory because cache is located closer to the CPU than memory is and, the closer the storage container is to the CPU, the faster the CPU will access it. Nowadays, cache is built inside the CPU chipset box for best performance.
- After performing some testing on CPUs, manufacturers found out that the CPU will benefit from having several levels of cache: Level 1, or L1 for short, is the fastest and closest cache to the CPU. Each core has its own Level 1 cache storage; Level 2 (L2) cache is slightly larger, slower, and further away from the CPU, and, again, every core has its own L2 storage; Level 3 (L3) cache is the largest, slowest, and furthest. Unlike L1 and L2, all the cores share the same one L3 cache storage.
- Each cache storage has its own size. For example, 64KB L1 means that each core has a level 1 cache of the size of 64 kilobytes. 33MB L3 means that there is one, large level 3 cache memory of 33 megabytes shared by all the cores. The listed L2 cache size sometimes stands for the total of L2 sizes for all the cores, but at other times, it indicates the cache size per core. Since 28MB L2 is closer in size to the L3 cache size, this is the total L2 cache size across all cores.