What do I mean by L1 cache and L2 cache?

Updated on number 2024-04-12
3 answers
  1. Anonymous users2024-02-07

    Cache

    Most of the data information processed by the CPU is retrieved from memory, but the computing speed of the CPU is much faster than that of memory, so a memory is placed in this transmission process to store the data and instructions that the CPU often uses. This increases the data transfer speed. There are two types of caches.

    L1 cache is the L1 cache. It is integrated inside the CPU and is used for the temporary storage of data during the processing of data by the CPU. Since the cache instructions and data work at the same frequency as the CPU, the larger the L1 cache capacity, the more information can be stored, which can reduce the number of data exchanges between the CPU and the memory and improve the computing efficiency of the CPU.

    However, because the cache memory is composed of static RAM and the structure is complex, the capacity of L1 cache cannot be too large in the limited CPU chip area.

    L2 cache is the L2 cache. Due to the limitation of L1 cache capacity, in order to increase the computing speed of the CPU again, a high-speed memory, that is, a L2 cache, is placed outside the CPU. The main frequency is flexible, and can be the same frequency as the CPU, or it can be different.

    When the CPU reads data, it looks first in L1, then from L2, then in memory, and then in external memory. Therefore, the impact of L2 on the system cannot be ignored.

    Memory-bus speed: refers to the speed at which data is exchanged between the CPU and L2 cache and memory.

  2. Anonymous users2024-02-06

    Level 1 cache (L1 cache), located next to the CPU core, is the CPU cache that is most closely integrated with the CPU, and it is also the earliest CPU cache in history. Because the technical difficulty and manufacturing cost of the L1 cache are the highest, the increase in technical difficulty and the increase in cost brought about by increasing the capacity is very large, but the performance improvement brought is not obvious, the cost performance is very low, and the hit rate of the existing L1 cache is already very high, so the L1 cache is the smallest capacity among all caches, and it is much smaller than the L2 cache.

    Generally speaking, L1 caches can be divided into L1 data cache (D-cache) and L1 instruction cache (i-cache). They are used to store data and decode instructions to execute it instantly, and both can be accessed by the CPU at the same time, reducing conflicts caused by contention and improving processor performance. At present, most CPUs have the same capacity as the L1 data cache and L1 instruction cache, for example, AMD's AthlonX has 64KB L1 data cache and 64KB L1 instruction cache, and its L1 cache is represented by 64KB+64KB, and so on for the rest of the CPUs.

    L2 cache is one of the keys to CPU performance, and increasing the L2 cache capacity can greatly improve performance without changing the CPU core. The difference between the high and low end of the CPU of the same core is often different in the L2 cache, which shows the importance of the L2 cache to the CPU.

  3. Anonymous users2024-02-05

    The main difference is that the speed and capacity of the cache at each level are different. The data selected in the memory is gradually improved in terms of read and write speed and made available to the CPU.

    1. These high-speed SRAM memories inside the CPU provide the CPU with the data acceleration required for computing, improve the computing efficiency of the CPU, and reduce the waiting time of the CPU;

    2. Example of the difference in working speed of L1, L2 and L3 of the i5 2500K processor, the test results are as follows:

    Reading speed l1 = ,l2 = ,l3 = ;

    Write rate l1 = ,l2 = ,l3 = 156GB s ;

    Copy L1 = 524GB; l2 = ,l3 = ;

    Its step-by-step speed increase accelerates the reading and writing of hit data, effectively improving the efficiency of data **.

    3. The internal cache capacity of different manufacturers or models of CPUs is also different. For example, for the i7 7700K processor, L1 is divided into 4 x 32KB instruction cache and 4 x 32KB data cache. L2 is 4x256kb; L3 is 8MB.

    4. When the CPU can't find the data it needs in the cache, it still has to go to the memory to read the data, and then call it into the cache, and the system speed will slow down. It can also be understood that memory is equivalent to L4 cache L4.

Related questions
7 answers2024-04-12

Caching is very important for CPUs.

So what exactly is this cache? >>>More

7 answers2024-04-12

L2 caching is more important.

The main frequency refers to the clock frequency of the CPU, theoretically speaking, the larger the main frequency, the faster, in fact, this is not the case, and it will be affected by many factors. >>>More

8 answers2024-04-12

Professional: Don't mislead the two upstairs, On the current multi-core CPU world, 1024 is not, several cores share 1024 L2 cache, there is no data exchange problem between caches, Intel's core series is such an architecture, 2x512, means 2 cores, each core has exclusive 512 L2 cache. AMD's U is such a design, the design of the second-level cache, there are size, speed constraints, because of Intel's U, the memory controller is outside the core, in this way, the exchange speed between the memory and the CPU can not be very fast, in order to reduce the number of low-speed exchanges between the CPU and the memory, therefore, Intel designs the second-level cache as a whole, and the capacity is relatively large, which is equivalent to, a big house is full of food, and nearby residents can quickly and easily obtain food and share resources, and AMD's U, because the memory controller is directly integrated into the CPU, his front-side bus, very fast, and, the cost of the L2 cache is relatively large in the CPU, AMD due to architectural reasons, can not design the L2 cache into a shared mode, so it can only be exclusive to each core, and then through the HT bus (AMD's proprietary front-end bus bus) to connect the 2 CPUs, this way is a bit backward, so the current AMD technology, It was abandoned by Intel for a whole generation, but the speed of the computer is not only determined by the CPU, because the AMD core integrates the memory controller, which is higher than the memory controller that Intel puts on the motherboard, the speed is higher, so, overall, the difference is not very big, but in terms of CPU monomer, Intel is still strong.

4 answers2024-04-12

Generally speaking, the larger the L2 cache of the CPU, the better, but some CPUs are not sensitive to L2 cache. >>>More

11 answers2024-04-12

It can be viewed via cpu-z:

Run the installed software, and you will see the L2 cache information on the interface: >>>More