Large cashe on processors what do they do exactly?

poppasmurf

Distinguished
Sep 10, 2010
109
0
18,690
Hi,
Got a question here cashe as in L1,L2 and L3 for processors what is it? (ie...AMD 910e w/L3 6GB)

What does each level do?

Will a gaming rig benefit from it? And why?

Will a dedicated gaming benefit from it? Again why? :eek:

-thanks
 

MarkG

Distinguished
Oct 13, 2004
841
0
19,010


Each level of cache is slower and larger, because making big, fast memories is expensive and complex. The L1 is typically a few kilobytes, contains the code you're currently running and some of the data it's accessing and can be accessed 'instantly'. The L2 is probably around half a megabyte and contains a larger amount of code and data but takes a few clock cycles to access. L1 and L2 are typically per-core, while the L3 is typically a few megabytes and shared across all the cores in the CPU.

L1 and L2 are pretty much essential if you don't want to cripple performance. L3 is nice to have, but you'll probably see a 0-25% drop in performance on different workloads if you don't. Since games tend to be more GPU-limited than CPU-limited, they'll probably be at the low end of that range.

Similarly, making a cache excessively large won't provide much benefit; going from 512k to a megabyte might improve performance by 10% while going from 4MB to 8MB only improves it by 1%. It all depends on how much code and data you're accessing and how much can be cached (if you're reading through a 1GB data set then cache won't help much at all).
 

jf-amd

Distinguished
Mar 3, 2010
238
0
18,690
There are also "exclusive" and "inclusive" caches. For instance, on AMD systems the L3 cache is exclusive. That means that there is no duplication of data in the L3 from the L2 (inclusive copies the same data to both places).

This means that when we have access to more data in the L3 (no duplication).

When the cpu core needs to write more data to a cache that is full, the oldest data is pushed out. There is a heirarchy of data, it rolls from the L1, to L2, to L3. L1 is split into instruction and data cache, only the data cache rolls over.

The purspose of the cache is to prevent the system from having to go to the (slower) memory or god forbid, to the hard drive for data.

Think of cache as the top of your desk. Everything you need can be accessed quickly. Memory is the file cabinet in your office. Easily accessible but you have to get up from your desk to get to it (slower access.) Your hard drive is the file room down the hall.