Why HDDs still matter

Despite SSD adoption, HDDs remain heavily used for high-capacity cold storage, backups, and data warehouses. Their mechanical structure yields a performance profile completely different from SSDs: decent sequential throughput, but extremely slow random access. Understanding this explains “why databases fear random disk reads the most”.

Physical structure

         ┌─────────────────────────────┐
         │   ┌───┐                      │
   Spindle→│   │Head│← Actuator arm      │
   rotate  │   └─┬─┘                      │
         │     │  hovers ~10nm above platter │
         │  ╔═══════════════════╗       │
         │  ║     Platter        ║  ← spins 7200-15000 RPM
         │  ╚═══════════════════╝       │
         └─────────────────────────────┘
   multiple platters stacked, a head on each surface

Key components:

  • Platter: magnetic medium coating, both sides usable
  • Track: concentric circle; Cylinder: same-radius tracks across surfaces
  • Sector: smallest read/write unit on a track (traditional 512B, modern 4KB Advanced Format)
  • Actuator arm: stepper-motor driven, moves radially to locate the target

Latency composition of one read/write

Total latency of one random access = seek + rotational latency + transfer:

        head moves to target track
              │  (Seek Time, 2-15ms)

   ┌──────────────────────────┐  platter rotates, target sector reaches head
   │ ░░░░░░░░░░░░░░░░░░░░░ │      (Rotational Latency, avg half revolution)
   └──────────────────────────┘          │
              ▼                    head reads sector data
                                   (Transfer Time, ~μs)
StageTypical (7200 RPM)Note
Seek3-15 msarm movement, dominant
Rotationalavg 4.2 ms7200 RPM = 8.3ms/rev, avg half
Transfer< 0.1 msdata out, negligible

Rotational latency: 7200 RPM = 120 rev/s → 8.33 ms per revolution, average wait half = 4.17 ms. At 15000 RPM it is 4 ms/rev, average 2 ms.

IOPS estimation

Random read IOPS ≈ 1 / average single-access latency. For a 7200 RPM disk:

avg latency ≈ seek(8ms) + rotational(4.2ms) + transfer(0.05ms) ≈ 12.25 ms
IOPS ≈ 1 / 0.01225 ≈ 80 IOPS

Compare: SSD random reads reach tens of thousands to hundreds of thousands of IOPS. This is exactly why HDD is crushed in random-access scenarios.

Sequential vs random: a world apart

  • Sequential: head stays put, platter rotates continuously, throughput 150-250 MB/s
  • Random: every access requires seek + wait, throughput drops to a few MB/s
Sequential scan 1GB:  1000 MB / 200 MB/s ≈ 5 s
Random read 1GB:      250000 IO × 12ms    ≈ 50 min  ← 600× difference

Queue depth and NCQ

Modern disks support NCQ (Native Command Queuing): multiple pending IOs are reordered so the head serves them along the shortest path, reducing back-and-forth movement:

Original:  read track 100 → 50 → 200 → 30
NCQ reorder: 30 → 50 → 100 → 200   ← head sweeps one direction, no往返

Raising queue depth moderately improves HDD throughput, but single-threaded synchronous random reads are still bounded by single-access latency.

Implications for databases

HDD traitDatabase response
random read very slow (~80 IOPS)buffer pool turns random reads into memory; indexes cut disk access
high sequential throughputsequential scan, bulk load are fast
seek is the bottleneckcluster / ordered storage reduces head movement
NCQ reordermoderate concurrent IO raises throughput

This is why early databases desperately built indexes, cached, and avoided full-table random scans — in the HDD era, one extra random disk read cost 12ms. Even though SSDs greatly relieve this today, understanding HDD still explains much historical design and the instinct to “prefer sequential over random”.

References