Where exactly L1, L2 and L3 Caches Located in computer ?

I know, we use Cache to increase performance by picking DATA and INSTRUCTIONS from Cache rather than Main Memory.

Following are my questions

  1. Where exactly L1 Cache located ? . is on the CPU chip ?
  2. Where exactly L2 Cache Located ?

  3. Where exactly L3 Cache Located ? is on the Mother Board ?

I think latest SMP processors uses 3 level caches so I want to understand Cache level hierarchy and their architecture .

link|improve this question
The exact hierarchy varies between different processors. To find out the cache hierarchy on your own machine, you could use SysInternal's CoreInfo.exe utility (technet.microsoft.com/en-us/sysinternals/cc835722.aspx) – Liran Oct 5 '10 at 15:00
Also, the larger the cache gets (L3 > L2 > 1) the farther its located from the core itself (the access latency to L3 higher than L1 for example). – Liran Oct 5 '10 at 15:15
feedback

migrated from stackoverflow.com Oct 5 '10 at 16:09

This question came from our site for professional and enthusiast programmers.

5 Answers

That caches are internals of processor. Some are shared between cores, some are individual, depends on implementation. But all of them are located on chip. Some details: Intel Intel® Core™ i7 Processor, taken here:

  • A 32-KB instruction and 32-KB data first-level cache (L1) for each core
  • A 256-KB shared instruction/data second-level cache (L2) for each core
  • 8-MB shared instruction/data last-level cache (L3), shared among all cores

Photo of processor chip (sorry, don't know exact model). You can see that cache takes significant area on chip:

alt text

link|improve this answer
feedback

Cache is almost always on chip for fastest access. Here is a nice diagram showing a quad core Intel CPU die with the L3 cache highlighted. When you look at pictures like this of a CPU die, large uniform areas are typically banks of on-chip memory used as a cache.

Nehalem Die (http://www.legitreviews.com/article/824/1/)

link|improve this answer
feedback

These days the caches are all on the CPU die. They used to sometimes be located on the motherboard, or on the CPU daughter-board, but I don't think there are any current processors that use of chip caches.

link|improve this answer
feedback

I am not sure about the L3, but L1/L2 is always located on the CPU. Hierarchy-wise, basically, L1 is usually the instruction cache, L2 and L3 are data caches.

link|improve this answer
feedback

I think that L1 cache memory is located in processor chip. L2 cache memory is located in on microprocessor. L3 cache memory is located in server microprocessor.

You can tell me that I am right

link|improve this answer
feedback

Your Answer

 
or
required, but never shown