The simple version
A hard disk is a record player. To read a song it has to move the arm to the right track (seek) and wait for the record to spin round to the right spot (rotational latency). Jumping around between songs is slow.
An SSD is a wall of mailboxes: any box opens equally fast. And NVMe is like giving that wall thousands of postmen at once instead of one postman with a short list.
Why HDDs are slow at random I/O
7,200 RPM → ½ × 8.33 ms ≈ 4.17 ms. Add a few ms of seek and each random I/O costs several ms, so a single HDD manages on the order of a hundred or two random IOPS.
Sequential reads avoid seeks, so HDDs still stream well. That's why they survive as cheap capacity and archive tiers, not as the tier GPUs read from directly.
Flash removes the moving parts
SSDs have no seek or rotation, so random reads typically complete in tens of microseconds rather than milliseconds. The internal parallelism (many NAND dies and channels, Lesson 6) also means an SSD only reaches full speed when many I/Os are in flight.
AHCI vs NVMe: the queue problem
| SATA / AHCI | NVMe | |
|---|---|---|
| Queues | 1 | Up to 65,535 I/O queues |
| Commands per queue | 32 | Up to 65,536 |
| Attachment | SATA controller | Directly on PCIe |
| Interface ceiling | SATA 3: 6 Gb/s (~600 MB/s) | Set by PCIe gen × lanes (Lesson 9) |
AHCI was designed for spinning disks. NVMe gives each CPU core its own queue pair, so cores don't fight over a lock to submit I/O.
Reading a drive's health
$ nvme list
$ sudo nvme smart-log /dev/nvme0
$ sudo smartctl -a /dev/nvme0
Watch percentage_used (rated endurance consumed), media_errors, critical_warning and the temperature fields. You'll use these again in Lesson 9's thermal-throttling discussion.
Tools
nvme listEvery NVMe namespace with model, capacity and firmware.
nvme smart-log /dev/nvme0Health log: wear, errors, temperatures (nvme-cli).
smartctl -a /dev/nvme0Same health data via smartmontools; also works for SATA/SAS.
cat /sys/block/sda/queue/rotational1 = spinning disk, 0 = non-rotational.
Quiz
Lab
Lab 2.2 · One drive with terrible p99
A training job's checkpoint restores are sometimes slow on gpu-a. Each of its four NVMe drives serves part of the data, and the slowest one sets the pace.
Try it now in the simulator (opens with the command ready; press Enter):
$ nvme list$ nvme smart-log /dev/nvme0