Every distributed database and event streaming broker—whether PostgreSQL, MySQL, Apache Kafka, or RocksDB—ultimately relies on persisting state to physical storage media. A naive mental model treats a disk as a simple byte array with uniform write times. In reality, modern NVMe SSDs are complex distributed systems in their own right, featuring multi-core controllers, DRAM write buffers, and NAND flash physics requiring out-of-place writes.
This module deconstructs the hardware and operating system storage path:
- NAND Flash & Write Amplification: How flash memory pages () and erase blocks () dictate sequential vs. random write performance and drive SSD wear.
- The Linux Page Cache: Dirty page buffering, dirty background writeback heuristics, and the trade-off between write throughput and crash recovery windows.
- Durability Guarantees: Why
write()does not guarantee persistence, and the precise mechanical cost offsync, battery-backed NVMe write caches, and Power Loss Protection (PLP).