hardware//storage//NVMe
NVMe (Non-Volatile Memory Express) is the protocol a computer uses to talk to flash storage over PCIe: the set of commands and queues by which the CPU asks an SSD to read or write blocks. It is a language: PCIe is the link that carries it, and M.2 is the card format and slot the drive usually comes in.
NVMe (Non-Volatile Memory Express) is the protocol a computer uses to talk to flash storage over PCIe: the set of commands and queues by which the CPU asks an SSD to read or write blocks. It is a language: PCIe is the link that carries it, and M.2 is the card format and slot the drive usually comes in.
It replaced AHCI, the protocol written for spinning disks over SATA, which offers one queue of 32 commands. NVMe allows up to 65,535 queues of 65,535 commands each, so every CPU core can keep its own queue and flash can serve many requests at once.
M.2, PCIe and NVMe are three layers of one drive.
A label like "M.2 NVMe PCIe 4.0 x4" names the shape (M.2), the protocol (NVMe) and the link (four lanes of PCIe 4.0, about 8 GB/s, about 7 GB/s of reads in practice). An M.2 slot can also carry a SATA SSD, which speaks AHCI over SATA and tops out near 0.55 GB/s: same shape, a tenth of the speed.
The speed ceiling of an NVMe drive is set by its PCIe link and by the flash behind it; NVMe itself adds almost no overhead.
Loading a 14 GB model from an NVMe SSD at 7 GB/s takes about 2 s, once; the step after that, host RAM to GPU over PCIe, is the next rung of the memory hierarchy.
It is a kind of storage interface; the same protocol also runs over networks (NVMe over Fabrics).