Plainnotes

Do not judge a disk by a single fio number

2025-01-17 · 2 min readSystems

A provider advertises "500 MB/s" and the database still crawls: that number is usually sequential read, while databases care about small random IOPS.

Measure at least four:

fio --name=seqread  --rw=read      --bs=1M   --size=1G --numjobs=1
fio --name=seqwrite --rw=write     --bs=1M   --size=1G --numjobs=1
fio --name=randread --rw=randread  --bs=4k   --iodepth=32 --numjobs=4
fio --name=randwrite --rw=randwrite --bs=4k  --iodepth=32 --numjobs=4

Cloud disks also burst: full speed for a few minutes, then the baseline. Run long enough — ten minutes — to see steady state rather than the peak.

And remember fsync: --fsync=1 measures durable writes, an order of magnitude below page cache, which is what the database actually feels.