Hardware Reference
In-Depth Information
Extending the restaurant analogy I used to explain L1 and L2 caches, I'll equate L3 cache
to another cart of additional food items placed in the restaurant next to the cart used to
symbolize L2 cache. If the food item needed was not on the table (L1 cache miss) or on
thefirstfoodcart(L2cachemiss),thewaitercouldthenreachovertothesecondfoodcart
to retrieve a necessary item.
L3 cache proves especially useful in multicore processors, where the L3 is generally
shared among all the cores. Both Intel and AMD use L3 cache in most of their current
processors because of the benefits to multicore designs.
Cache Performance and Design
JustaswiththeL1cache,mostL2cacheshaveahitratioalsointhe90%range;therefore,
if you look at the system as a whole, 90% of the time it runs at full speed (233MHz in this
example) by retrieving data out of the L1 cache. Ten percent of the time it slows down to
retrieve the data from the L2 cache. Ninety percent of the time the processor goes to the
L2cache, thedata isintheL2,and10%ofthat time ithastogototheslowmain memory
to get the data because of an L2 cache miss. So, by combining both caches, our sample
system runs at full processor speed 90% of the time (233MHz in this case), at mother-
board speed 9% (90% of 10%) of the time (66MHz in this case), and at RAM speed about
1% (10% of 10%) of the time (16MHz in this case). You can clearly see the importance
of both the L1 and L2 caches; without them the system uses main memory more often,
which is significantly slower than the processor.
This brings up other interesting points. If you could spend money doubling the perform-
anceofeitherthemainmemory(RAM)ortheL2cache,whichwouldyouimprove?Con-
sidering that main memory is used directly only about 1% of the time, if you doubled per-
formance there, you would double the speed of your system only 1% of the time! That
doesn'tsoundlikeenoughofanimprovementtojustifymuchexpense.Ontheotherhand,
if you doubled L2 cache performance, you would be doubling system performance 9% of
the time, which is a much greater improvement overall. I'd much rather improve L2 than
RAM performance. The same argument holds true for adding and increasing the size of
L3 cache, as many recent processors from AMD and some from Intel have done.
The processor and system designers at Intel and AMD know this and have devised meth-
ods of improving the performance of L2 cache. In Pentium (P5) class systems, the L2
cache usually was found on the motherboard and had to run at motherboard speed. Intel
made the first dramatic improvement by migrating the L2 cache from the motherboard
directly into the processor andinitially runningit at the same speed as the main processor.
ThecachechipsweremadebyIntelandmountednexttothemainprocessordieinasingle
chip housing. This proved too expensive, so with the Pentium II, Intel began using cache
chipsfromthird-partysupplierssuchasSony,Toshiba,NEC,andSamsung.Becausethese
Search WWH ::




Custom Search