Skip to main content

03. Storage Media β€” HDD, SSD & NVMe

Storage media physics dictate the fundamental limits of latency, throughput, concurrency, and longevity in modern infrastructure.


1. Hard Disk Drives (HDDs): Electromechanical Mechanics​

HDDs store bits by magnetizing microscopic magnetic domains on rotating ferromagnetic platters.

Spindle Motor
β”‚
β”Œβ”€β”€β”΄β”€β”€β” Read/Write Head
β”Œβ”€β”€β”€β”€β”€ β–ˆ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€\
β”‚ β””β”€β”€β”¬β”€β”€β”˜ \====[ Head Gimbal Assembly ]
β”‚ Platters \
β”‚ (5400-15000 RPM) \ Actuator Arm
β”‚ \
β–Ό β–²
Rotational Latency Seek Time (Voice Coil Motor)

Components of HDD Access Latency​

TotalΒ Latency=Tseek+Trotational+Ttransfer+Tcontroller\text{Total Latency} = T_{\text{seek}} + T_{\text{rotational}} + T_{\text{transfer}} + T_{\text{controller}}

  1. Seek Time (TseekT_{\text{seek}}): The mechanical time taken by the voice-coil actuator to position the head over the specified track (3Β msβˆ’9Β ms3\text{ ms} - 9\text{ ms}).
  2. Rotational Latency (TrotationalT_{\text{rotational}}): Time spent waiting for the target sector to spin beneath the head. AvgΒ RotationalΒ Latency=12Γ—(60RPM)\text{Avg Rotational Latency} = \frac{1}{2} \times \left(\frac{60}{\text{RPM}}\right)
    • At 7,200 RPM: β‰ˆ4.16Β ms\approx 4.16\text{ ms}.
    • At 15,000 RPM: β‰ˆ2.00Β ms\approx 2.00\text{ ms}.
  3. Transfer Time: Electrical streaming speed of sectors across the magnetic head (β‰ˆ150βˆ’260Β MB/s\approx 150 - 260\text{ MB/s}).

2. Solid State Drives (SSDs) & NAND Flash Physics​

SSDs eliminate all moving parts by storing electrons in floating-gate or charge-trap flash transistors.

Control Gate
──────────────────────
Inter-poly Oxide
──────────────────────
Floating Gate (Stores trapped electrons)
──────────────────────
Tunnel Oxide (Subject to wear / degradation)
──────────────────────
P-Substrate (Source / Drain Silicon)

Cell Storage Densities​

  • SLC (Single-Level Cell): 1 bit per cell. 100,000 P/E cycles. Lowest latency, ultra-high endurance.
  • MLC (Multi-Level Cell): 2 bits per cell. ~10,000 P/E cycles.
  • TLC (Triple-Level Cell): 3 bits per cell. ~3,000 P/E cycles. Industry standard for enterprise and consumer.
  • QLC (Quad-Level Cell): 4 bits per cell. ~1,000 P/E cycles. Used for read-intensive cold/warm bulk storage.

The Asymmetric In-Place Update Problem​

  • Reads: Occur at the Page level (4Β KBβˆ’16Β KB4\text{ KB} - 16\text{ KB}), latency β‰ˆ20βˆ’50ΞΌs\approx 20 - 50\mu\text{s}.
  • Writes / Programming: Occur at the Page level, latency β‰ˆ200βˆ’500ΞΌs\approx 200 - 500\mu\text{s}.
  • Erases: Can ONLY occur at the Erase Block level (4Β MBβˆ’16Β MB4\text{ MB} - 16\text{ MB}), latency β‰ˆ2βˆ’5Β ms\approx 2 - 5\text{ ms}.

Because flash cannot overwrite a page without first erasing its entire block, writes must be directed to empty pre-erased pages, requiring the Flash Translation Layer (FTL).


3. The Flash Translation Layer (FTL) & Garbage Collection​

The FTL is an embedded real-time operating system running inside the SSD controller:

  1. LBA-to-PBA Mapping: Translates logical host addresses to dynamic physical NAND flash addresses.
  2. Wear Leveling: Distributes writes evenly across all physical blocks to prevent localized premature cell death (Static and Dynamic Wear Leveling).
  3. Garbage Collection (GC):
    • Scans erase blocks containing stale/deleted pages.
    • Copies remaining valid pages to an empty erase block.
    • Issues a high-voltage erase command on the old block to reclaim it for future writes.
  4. TRIM / Deallocate Command:
    • Informs the SSD controller when a file is deleted by the OS filesystem.
    • Prevents the SSD from wasting write endurance copying deleted blocks during garbage collection cycles.

4. Hardware Interfaces & Protocols: SATA vs. SAS vs. NVMe​

+---------------+------------------------+------------------------+------------------------+
| Feature | SATA III | SAS 3 / SAS 4 | NVMe (PCIe 4.0 / 5.0) |
+---------------+------------------------+------------------------+------------------------+
| Protocol | AHCI (designed for HDD)| SCSI Command Set | NVMe native protocol |
| Bus Interface | Serial ATA (6 Gbps) | Serial Attached SCSI | PCIe Gen 4/5 (x4 lanes)|
| Max Bandwidth | ~550 MB/s | ~1.2 - 2.4 GB/s | ~7.5 - 14.0 GB/s |
| Command Queues| 1 Queue | Up to 254 Queues | Up to 64,000 Queues |
| Queue Depth | 32 Commands max | 254 Commands per queue | 64,000 Commands / queue|
| CPU Overhead | High (single lock) | Moderate | Minimal (multi-core) |
+---------------+------------------------+------------------------+------------------------+

5. Media Comparison Matrix​

Storage MediumTypical Random 4K Read LatencyMax Random Read IOPSSequential Read ThroughputCost per TB ($)Primary Workload
Enterprise 7200 RPM HDD4,000βˆ’8,000ΞΌs4,000 - 8,000\mu\text{s}β‰ˆ75βˆ’120\approx 75 - 120β‰ˆ220Β MB/s\approx 220\text{ MB/s}~$15Cold archive, backup, video
Enterprise SATA SSD100βˆ’200ΞΌs100 - 200\mu\text{s}β‰ˆ95,000\approx 95,000β‰ˆ550Β MB/s\approx 550\text{ MB/s}~$60Legacy virtualization
Enterprise NVMe TLC SSD10βˆ’20ΞΌs10 - 20\mu\text{s}β‰ˆ800,000βˆ’1,500,000\approx 800,000 - 1,500,000β‰ˆ7,000Β MB/s\approx 7,000\text{ MB/s}~$90Real-time OLTP, analytics, AI