Lecture 01 · Storage

The whole deck on two pages. Page numbers refer to lectures/Lecture_01_Storage.pdf.

Hierarchy

HDD vs SSD

HDDSSD (NVMe)
Latency2–10 ms10–100s µs (NVMe <10 µs)
Bandwidth100s MB/sseveral GB/s; PCIe4 ×4 ≈ 7, PCIe5 ×4 ≈ 14, PCIe6 ×4 ≈ 32 GB/s
Cost of accessseek + rotation + transferneeds many outstanding requests (channels)
Quirksplacement on disk matterserase-before-write, GC, write amplification ≥ 1, wear leveling, latency spikes
Price$$$$ (gap closing)

pp.19–25, 30

random n blocks = n(a + t) sequential n blocks = a + n·t a = seek + rotation Little's Law: queue depth = IOPS × latency (1 M IOPS × 10 µs = 10)

Interfaces & software path

Beyond the local disk

File systems (OS view)

Data formats

CSVParquetArrow
Kindtext, row linesbinary, columnar, pagesin-memory columnar
Metadatanonerichschema
Parse speed10s MB/s, hard to parallelise>100s MB/s/coreno parsing
Focussimplicitycompression, column accessaccess speed

Parquet row group → column chunk → page; decode/decompress to Arrow. High-rate systems still burn much compute on Parquet parsing → Vortex, BtrBlocks pp.56–59

Exam-style questions from the deck p.61

  1. T/F: with flash, Linux retired the block device interface.
  2. 100 MB in 4 KB sequential pages: SATA-II HDD vs PCIe 5 ×4 SSD — how long? (worked in lesson 0001)
  3. T/F: io_uring allows async disk access with buffers in kernel space.
  4. Do apps need fundamentally different interfaces for local vs remote storage? Why / why not?