What is NVMe?

NVMe stands for Non-Volatile Memory Express. Before we talk about NVMe, we have to start with Solid State Drives (SSDs). SSD is the name for any type of persistent storage that is completely electronic and does not have any moving part, hence the name "solid-state", unlike for example electromagnetic spinning disks which we know as Hard Disk Drives (HDDs). 
Is SSD the same as flash? 
Some people use SSD and Flash interchangeably. However, SSD and flash are different. As said above, any storage drive that does not have mechanical moving parts is considered SSD. NAND-based flash is a popular medium for SSDs, but nothing prevents us from using a different medium for an SSD. In fact, early SSDs used technologies other than flash. The relation of SSD and flash is like the relation of the CD-Drive and CD. CD is a medium for CD-Drives. In the same way, flash is a medium for the SSDs. 

What is a NAND-based flash? 
A NAND-based flash is an electronic storage medium that uses NAND gates to store the information. 

What does a NAND gate do and what is special about it? Why not other types of gates?
NAND is a logical operation that is defined as the negation of the AND operation.

Figure 1. NAND logical operation and its symbol

NAND (and also NOR) has an important property called functional completeness which means we can write any boolean formula using only NAND operations. Thus, we can store any boolean data with just NAND gates. We cannot do the same with AND gates for example. 

The typical architecture of an SSD is shown in Figure 2. 

Figure 2. A typical architecture of an SSD. An SSD has a controller which is usually an ARM type processor and a small DRAM that the controller uses for its processing.

A drive connects to the rest of the computer system via an interface. Each interface has a specification that defines how we can communicate with the drive. Early SSDs used slower interfaces such as SATA and used specifications such as AHCI designed by Intel. But SATA and AHCI were designed for spinning hard drives. Thus, they do not let us fully utilize SSD capabilities. Here it comes the NVMe: NVMe is a specification defining how we can communicate with an SSD via high-speed PCI Express (PCIe) instead of slower interfaces such as SATA. NVMe dramatically improves the performance of SSDs. 

How much improvement we are talking about?
A lot. A modern 7200 RPM spinning hard drive gives ~100 MB/s read-write performance. A SATA SSD can do ~500 MB/s. An NVMe SSD (with PCIe 3) can server read-write at ~3500 MB/s. That is 7 times faster than SATA SSDs and 35 times faster than spinning HDDs! But note that, not all NVMe SSDs provide exactly this performance. These are some numbers to have an idea on how much better we are talking about. 

So NVMe is not the name of special hardware or anything like that?
No. It is just the specification. It is the name of this document which is written by a consortium of the industry leaders. Check it out. 

Are SSDs with NVMe in the market?
Of course. Your recently purchased Mac book or PC most likely has an NVMe SSD. That's why they are freaking fast, and boot so quickly. 

Why we didn't use them sooner? 
The use of SSDs was limited due to the high price of flash memory compared with the price of the hard disks. 

Comments

Popular posts from this blog

In-memory vs. On-disk Databases

ByteGraph: A Graph Database for TikTok

Amazon DynamoDB: ACID Transactions using Timestamp Ordering

Eventual Consistency and Conflict Resolution - Part 1