An explanation of CPU / Processor L2 Cache

Article Technical Level: Novice

This is a simplified quality explanation of CPU cache and how it works. Many folks wonder why some processors have very little cache and others have enormous amounts as well as how it works.

Cache: The Athlon X2 has 2x 512KB cache allocations for L2 Cache. This is a very small data block (memory) built directly into the CPU itself. This is very high speed memory (exponentially faster then RAM) used for storing each block of data to be processed by the CPU as it enters. There are several “levels” of cache which are related to how they connect to the CPU (hence L1, L2, etc). L2 Cache is almost always the quoted part of any processor detail. Cache is also faster/slower and bigger/smaller. Think of it like a road. A 2 lane road with a 35mph limit should move just as many cars as 1 lane road with a 70mph limit (obviously this makes traffic patterns simplified but, its an example). In this case, the Athlon X2′s cache is very fast (think 70mph limit) but cannot contain a lot of data at a time (1 lane). AMD actually has 2x 1MB L2 cache processors in their FX and Opteron lines. The difference in performance with double the cache for AMD’s line of processors was about 1% in almost every application yet increased costs significantly. From a totally different perspective, Intel’s older line of Pentium 4, Pentium D series processors had huge amounts of L2 cache (up to 4MB!), Intel did this in an attempt to make up for a failing architecture, a band-aid fix to increase performance, though marginally. AMD’s Athlon X2 line uses separate L2 cache for each processor core (dual-core) so it really has a full 1MB on board (2x 512KB). Intel’s new Core 2 Duo line starts at 2MB and goes up to 4MB with their higher end Core 2 Duo’s. More cache generally means better performance, but when dealing with cache – there is extreme diminishing returns, cost goes up incredibly quick and performance increases are minimal. When I say “performance” in relation to CPU cache – it generally translate to the end user as slightly faster access times when doing things like starting a program or opening a file as the first bits of data to crunch are quickly grabbed from the file system. In reality, the difference is going to be incredibly minimal as long as the CPU is not “data starved”. This is what happens with the very low end CPU’s from Intel (Celeron) and AMD (Sempron). They have very small L2 cache blocks and the CPU crunches the data faster then the L2 cache can call and store it, the CPU ends up idling; waiting on data. If you do want to go with a CPU with more cache, we can look at upgrading the CPU to a higher rated Athlon X2 with 2x 1MB L2 (I believe the 4400+ has 2x 1MB) or to a FX series AMD CPU. All in all, 2x 512KB is indeed not a smaller then average cache size. The first Intel Celeron chips had zero L2 cache.

Advertisement

About this entry