Interview Prep Zoneby CuriouserLabs

Question 5 of 5 · architect level

HDD vs SSD vs NVMe: how did storage change, and which software designs became obsolete (or newly possible)?

🎤 Say this first

HDDs are mechanical: ~10ms random seeks but decent sequential streaming — three decades of software (B-trees with big pages, elevator schedulers, 'sequentialize everything', LSM-trees, Kafka's log) was designed around avoiding seeks. Flash SSDs: no moving parts, ~100µs, real internal parallelism — but writes are page-sized, erases are block-sized, so an FTL remaps everything (hence garbage collection, write amplification, TRIM, and 'steady-state performance ≠ fresh-drive benchmark'). NVMe removed the last software bottleneck: PCIe attachment + up to 64K queues × 64K depth designed for parallelism (AHCI had one queue of 32). Consequences: random I/O stopped being scary, io_uring/SPDK exist to keep up, and the new bottleneck is often the software path length, not the device.

The full picture

HDDSATA SSDNVMe SSD
Random 4K latency~5–10ms (seek+rotate)~100µs~20–100µs
Random IOPS~100–200~50–100K~0.5–1M+
Parallelism1 head assemblyinternal, throttled by AHCIexplicit: 64K queues
Design pressure it createdavoid seeks: logs, LSM, elevatorFTL awareness: TRIM, WAqueue depth, io_uring, thread-per-core
  • Flash mechanics worth two sentences: write pages (~16KB), erase only whole blocks (~MBs) → FTL does copy-on-write + GC internally → sustained random writes trigger internal GC → latency spikes and write amplification; over-provisioning and TRIM keep the FTL breathing. This is why cheap consumer drives fall off a cliff in databases.
  • What became obsolete: seek-minimizing schedulers (noop/none for NVMe), 'random reads are 100× worse' rules of thumb, painstaking data clustering purely for locality-on-platter. What became possible: high-QD designs, thread-per-core storage engines (ScyllaDB), disaggregated storage (NVMe-oF at ~10µs network penalty).
  • What survived, interestingly: LSM-trees and append-only logs — designed for HDDs, still winning on SSDs because sequential writes also minimize flash GC and write amplification. Good designs aligned with physics twice.
  • Architect checkboxes for cloud volumes: EBS/PD are network block devices — latency profiles, IOPS provisioning and fsync behavior differ from local NVMe; 'local NVMe cache + replicated network volume' hybrids are the current design idiom.

🔄 Likely follow-up questions

  • Why do LSM-trees remain optimal on flash despite being designed for disks?
  • What is write amplification end-to-end (app × FS × FTL), and how do you measure it?
  • When does NVMe-over-Fabrics change a storage architecture decision?