Storage I/O and Durability
Problem
A disk copies a large video quickly, but a database making thousands of small updates is slow. Later, a power failure loses a recent file update even though the application reported that the write succeeded. How can both happen?
Solution — Understand the I/O Pattern and Write Guarantee
IOPS counts input/output operations per second. Throughput measures bytes transferred per second. For fixed-size data operations, throughput equals IOPS multiplied by operation size: 1,000 operations of 4 KiB each transfer about 3.9 MiB per second.
Large sequential transfers and small random accesses stress storage differently. Latency, request size, parallel requests, and caching all affect the result. A large-file benchmark does not describe every workload.
A write can pass through application buffers, operating-system caches, and storage-controller caches. Depending on the API and configuration, success may mean that a buffer accepted the data. It does not always mean the data can survive power loss.
Operating-system flush and write-through operations request that writes reach persistent storage. Their durability still depends on the complete storage stack honoring the guarantee, including hardware caches. Check what a successful write promises and which failures it is designed to survive.
Core idea: storage performance depends on the access pattern; durability depends on what a successful write actually guarantees.