Sunteți pe pagina 1din 2


What is the difference between L1

cache and L2 cache?
In: Computer Terminology, Microprocessors [Edit categories]

A memory cache, sometimes called a cache store or RAM cache, is a portion of memory
made of high-speed static RAM (SRAM) instead of the slower and cheaper dynamic
RAM (DRAM) used for main memory. Memory caching is effective because most
programs access the same data or instructions over and over. By keeping as much of this
information as possible in SRAM, the computer avoids accessing the slower DRAM.

Short for Level 1 cache, a memory cache built into the microprocessor.

Short for Level 2 cache, cache memory that is external to the microprocessor. In general,
L2 cache memory, also called the secondary cache, resides on a separate chip from the
microprocessor chip.

As more and more processors begin to include L2 cache into their architectures, Level 3
cache is now the name for the extra cache built into motherboards between the
microprocessor and the main memory.

the l2 cache is now always built onto the processor for x86 archetechure

Well, half of what I was objecting to, you edited out before I finished the post :) You are
right, though, that the L1 and L2 caches are essentially serving different functions. But
the whole storage paradigm:

register->primary cache->secondary cache->system ram->virtual ram

Is based off of diminishing returns. The absolute fastest storage is a local register...but
those are extremely expensive to add to a processor. Each step down gets slower, but

Originally posted by masher

CPU Cache (the example CPU is a little old but the concepts are still the same):

• The initial level of storage on a processor are the registers. The registers are
where the actually processing input and output takes place.
• L1 cache - Then the level 1 cache comes next. It is logically the closest high
speed memory to the CPU core / registers. It usually runs at the full speed
(meaning the same as the CPU core clockspeed). L1 often comes in size of 8kB,
16kB, 32kB, 64kB or 128kB. But, it is very high speed even though the amount is
relatively small.
• L2 cache - The next level of cache is L2, or level 2. Nowadays L2 is larger than
L1 and it often comes in 256kB, 512kB and 1,024MB amounts. L2 often runs at
1/4, 1/2 or full speed in relation to the CPU core clockspeed.
• L3 cache - Level 3 cache is something of a luxury item. Often only high end
workstations and servers need L3 cache. Currently for consumers only the
Pentium 4 Extreme Edition even features L3 cache. L3 has been both "on-die",
meaning part of the CPU or "external" meaning mounted near the CPU on the
motherboard. It comes in many sizes and speeds.

The point of cache is to keep the processor pipeline fed with data. CPU cores are
typically the fastest part in the computer. As a result cache is used to pre-read or store
frequently used instructions and data for quick access. Cache acts as a high speed buffer
memory to more quickly provide the CPU with data.

So, the concept of CPU cache leveling is one of performance optimization for the