From DDR to DDR4, the core frequency of the memory has basically not improved much.

From the development of DDR memory in 2001 to 2019, it has gone through the four major specifications era of DDR, DDR2, DDR3, and DDR4 (DDR5 is now also available). The operating frequency of the memory has also evolved from 266MHz in the DDR era to 3200MHz today. This frequency is called Speed ​​in the operating system, equivalent frequency in memory terminology, or simply referred to as frequency. The higher the frequency, the greater the throughput of memory IO per second. But in fact, the most basic frequency of the memory is called the core frequency, which is an oscillation frequency when the actual memory circuit is working. It is the basis of memory work and will largely affect the IO latency of memory. I want to reveal another side to you today. In fact, this Dongdong called core frequency has basically not made much progress in the last 18 years.

image

Memory Speed

You can view the Speed ​​of the memory on your machine on Linux.

# dmidecode | grep -P -A16 "Memory Device"Memory DeviceArray Handle: 0x0009Error Information Handle: Not ProvidedTotal Width: 72 bitsData Width: 64 bitsSize: 8192 MBForm Factor: DIMMSet: NoneLocator: DIMM02Bank Locator: BANK02Type: OtherType Detail: UnknownSpeed: 1067 MHzManufacturer: MicronSerial Number: 65ED91DCAsset Tag: UnknownPart Number: 36KSF1G72PZ-1G4M1......


The above command can see the status of the physical memory device on each slot. Because the result is too long, I only extracted the information of one of the memory and listed it. For us developers, two of the data are more critical.

  • Speed: 1067 MHz: The speed at which memory data can be transferred per second,

  • Data Width: 64 bits: the data width of one transmission of memory work

The Speed ​​of all the memory sticks on my machine is 1067 (Don't laugh at me, because my test machine is a machine eliminated from the online warranty, so it is a little older). The data bandwidth is obtained by multiplying Data Width and Speed. We have summarized the Speed ​​and bandwidth of the memory at various stages in history, as shown in the figure below.

Figure 1 Memory frequency of each generation

The secret behind the memory-core frequency

Through Linux, we only saw a Speed ​​of memory, which is the frequency of data transmission. This frequency is also called Data Speed, or equivalent frequency. Various merchants also mark this frequency in a particularly obvious position on the memory sales page to remind consumers how fast and fast their memory is. But in fact, in terms of the technical parameters of the memory module, there is the most important frequency, the core frequency, which is the oscillation frequency of the memory circuit and the cornerstone of all the work of the memory .

Let's look at more comprehensive and detailed data of each generation of memory.

Figure 2 Core frequency and technology improvement methods of each generation of memory

I have summarized the frequency table comparison of the DDR4 memory from the SDR era to the current mainstream. You can see that the core frequency has not been substantially improved for many years. This is limited by the limits of physical materials. The core frequency of the memory has been hovering between 133MHz and 200MHz . The memory Speed ​​we have seen is based on this core frequency and amplified by various technical means. The reason why we feel that the memory is getting faster and faster is that the amplification technology is constantly improving.

  • SDR era : In the oldest SDR (Single Data Rate SDRAM) era, a clock pulse can only transmit data at the upper edge of the pulse, so it is also called single data rate memory. The way to improve memory during this period is to increase the core frequency of the memory circuit.

  • DDR era : But memory manufacturers find that if the core frequency is increased to 200MHz, it will be very difficult. Therefore, 2bit is prefetched in the circuit clock cycle, and data is transmitted once in the rising period and the falling period when output. So when the core frequency remains the same, Speed ​​(equivalent frequency) doubles.

  • DDR2 era : The data is also transmitted once on the upper and lower edges, but the Prefech is increased to 4, and 4 bits are read once per circuit cycle. So the Speed ​​(equivalent frequency) of DDR2 reaches 4 times the core frequency.

  • DDR3 era : The data is also transmitted once on the upper and lower edges, further improving the Prefect to 8. So the equivalent frequency of DDR3 can reach 8 times the core frequency.

  • DDR4 era : At this time, the improvement of prefetch is very difficult, so like DDR3, Prefech is still 8. Memory manufacturers took a different approach and proposed the Bank Group design. Allow each Bank Group to have independent startup operation read, write and other action characteristics. So the equivalent frequency can be increased to 16 times the core frequency.

There is another concept of memory called IO frequency, also called clock frequency. Simply understood as dividing the Speed ​​frequency of DDR memory by 2, it is the IO frequency of the memory. This must match the external frequency of the CPU to work. For DDR3, for example, if the core frequency of the memory is 133Mhz, and the CPU FSB of 533MHz is matched, the IO frequency is 533Mhz. The data transmission is 8 times the core frequency because the upper and lower edges can be transmitted, which is 1066MHz.

I tried to find a command to check the core frequency and IO frequency under Linux, but I didn't find it. It seems that the various memory sticks on sale rarely mention it. But we are IT practitioners, not ordinary users. Therefore, I think it is necessary for everyone to understand this principle. (In fact, these two frequencies will affect the delay parameters of the memory discussed later, and the delay parameters determine the real performance of the memory)

In a word, the real working frequency of the memory is the core frequency, and the clock frequency and data frequency are all amplified by technical means on the basis of the core frequency. The newer the memory, the more magnification. But in fact, these amplification methods have some limitations. For example, your memory data storage is not continuous, at this time DDR2, DDR3 data prefetching is not very helpful to you. For example, your process data is stored in a Bank Group, and your process memory IO will not reach the speed advertised by DDR4 manufacturers.

Memory latency

In addition to frequency, there are several more important parameters for memory, but there is also no command to view in Linux. It is not particularly easy to find these parameters on the memory sales page.

All memory modules have four parameters: CL-tRCD-tRP-tRAS. The most important of these are the three parameters CL-tRCD-tRP. As long as you work a little bit, you can find these three values ​​in all the memory on sale. For example, the CL values ​​of classic DDR3-1066, DDR3-1333, and DDR3-1600 are 7-7-7, 8-8-8, and 9-9-9, respectively. Now on JD.com, a popular desktop memory Kingston (Kingston) DDR4 2400 8G, its timing is 17-17-17.

The fourth parameter is sometimes omitted. There are two reasons. First: Nowadays developers don't need to deal with memory directly, and the operating system is more memory-friendly, and this overhead rarely happens. Second, the value of this overhead is much larger than the other values, which is really not pretty. In order to sell more memory, merchants simply avoided talking about it.

Okay, here comes the problem. Why does the more memory improve, the greater the delay period?

This is because the delay period is calculated by dividing the delay time by the memory Speed. This is actually not scientific at all, and the most scientific method should be to use delay time to evaluate. The delay time is largely restricted by the core frequency of the memory . In these years, the core frequency has basically not improved, so the delay time will not be substantially reduced. In order to make the frequency data look good, the memory manufacturers can sell more memory and have to use Speed ​​as the main cycle. As a result, as soon as this cycle is used, it seems that the delay cycle becomes larger and larger.

Today I will take everyone to understand this, and I will use experiments to let you understand the actual delay of your memory.


Guess you like

Origin blog.51cto.com/15057824/2627792