One of the NVMe series topics: an overview of NVMe technology

1. The birth of NVMe

Before the birth of NVMe , the world of hard drives was still dominated by AHCI. So the question is, what is AHCI? AHCI, the English full name is Serial ATA Advanced Host Controller Interface, and the Chinese name is "Serial ATA Advanced Host Controller Interface" or "Advanced Host Controller Interface". It is a system interface standard developed by Intel and several companies.

Before the era of information explosion, under the leadership of AHCI , SATA was flourishing and famous in history. However, SATA/AHCI is actually born for mechanical hard disk HHD, and its fatal flaw is that the transmission speed has a bottleneck, and the maximum does not exceed 600MB/s. Later, AHCI also realized its own crisis, and hired PCIe, another capable person with a high salary. As for PCIe, it shines brightly, and AHCI can't control it at all. PCIe also complains to AHCI. AHCI can't provide a platform for PCIe to display its talents. After partnering with AHCI for a short period of time, PCIe began to withdraw.

Just when PCIe was starting to disappoint the world, PCIe met NVMe. After being frustrated, PCIe finally got his own Bole. After the combination of PCIe/NVMe, the pair has shown unprecedented energy and is using their strength to conquer the world.

The above "nonsense" described the relationship between AHCI, NVME, SATA, and PCIe, and drew a picture for everyone to understand:

The original name of NVMe was NVMHCI, which was proposed at the Intel Developer Forum (IDF) in 2007, and Intel led the establishment of the NVMe development working group in the same year. There are 13 leading companies (as shown below) and nearly a hundred members in this working group.

2. Features and advantages of NVMe

NVMe is mainly a set of interface standards developed for PCIe SSDs (note that it is not limited to SSDs, it is still very promising for other NVM storage, and this article is mainly for PCIe SSDs). NVMe defines the system interface and command set. The goal is better performance, lower latency, and lower power consumption. Let's first compare the characteristics of AHCI and NVMe, see the picture (from Intel FMS 2012).

The speed advantage of NVMe

For users, the data transmission speed experience of SSD is the first sense.

Let's take a look at the comparison data between NVMe/PCIe and AHCI/SATA (source: Intel). The following is a comparison of the 128K sequential read and write speeds of the Intel NVMe SSD P3700 series and the Intel SATA SSD S3700 series. It can be seen that the read and write performance of the NVMe SSD has been improved by nearly 6 times.

Let's look at another set of speed comparisons between NVMe/PCIe and AHCI/PCIe. The data also comes from Intel. As can be seen from the figure below, NVMe SSD has 2~3 times improvement in read and write performance compared with AHCI/PCIe SSD.

After comparing the two sets of data, it can be proved that NVMe/PCIe is currently the strongest combination.

NVMe's Low Latency Advantage

Compared with AHCI, NVMe has made efforts in two aspects to reduce storage system latency:

  • As mentioned earlier, NVMe mainly serves PCIe SSDs, and PCIe channels do not need to be connected to the South Bridge for transit like SATA, and can be directly connected to the CPU (the CPU here should be the Root Complex to be exact), and the high-speed rail is direct, and the delay is reduced by a part ;

  • NVMe, like the Prime Minister, insists on "simplification of administration and decentralization of power", and does not cause trouble to the masses. Therefore, the process of NVMe executing commands is completely simplified and executed directly without reading registers . However, in the previous AHCI, the register must be read 4 times when the command is executed, and this process will cause a delay of 2.5 μs.

The IOPS advantage of NVMe

In theory, IOPS is related to queue depth (Queue Depth) and IO delay. The mathematical expression is:

IOPS=queue depth/IO latency.

From the above expression, we can see that IOPS has a great relationship with queue depth. But there is one thing to note: In practical applications, as the queue depth increases, the IO delay will also increase accordingly. In AHCI, only one queue is supported, and the queue depth is only 32. NVMe supports 64K queues, and the depth of each queue can reach 64K. In such a comparison, AHCI is really weak~ No wonder PCIe is depressed~

Another picture, the data has the most say (data from Intel IDF 2015). NVMe absolutely crushes SATA.

In fact, if you want to fully release the IOPS performance of NVMe SSD, designers must first evaluate it, because when the queue depth reaches a certain level, the IOPS of NVMe SSD will reach the best. As shown in the figure below (from Tom'Hardware), the six NVMe SSDs all achieve the best performance when the queue depth is above 128.

In the NVMe white paper, the recommendations for the queue depth required for the design of enterprise-level SSDs and consumer-level SSDs are:

  • Enterprise SSD: 16~128 Queues;

  • Consumer grade SSD: 2-8 Queues.

NVMe's Low Power Benefits

Automatic power state transitions and dynamic power management mechanisms are added to NVMe. NVMe Spec supports 1-32 power states (PS, Power State). When the host turns on the automatic power state transition function, you can set the idle time to automatically transition to other power states according to your preferences. For example, we define 6 PSs, and define to enter PS1 after Idle (PS0) 10ms, enter PS2 after Idle 50ms, enter PS3 after Idle 100ms...these are all customized. If the automatic power state transition function is not enabled on the Host, the power state transition can also be performed by issuing the Set feature command.

However, the automatic power state switching function is generally only used on consumer-grade SSDs, which is of great help to the battery life of notebook computers. In enterprise-level SSDs, data security is still the first priority, and power consumption is rarely considered.

This article is mainly a general introduction to NVMe technology, the follow-up article will describe the details of NVMe, so stay tuned, thank you very much!

Guess you like

Origin blog.csdn.net/cy413026/article/details/131838763