How do you benchmark disk performance correctly?
AdvancedProductionPerformance & the USE Method
Answer
Use fio with a workload that matches the application, not dd:
fio --name=randrw --filename=/data/fio.test --size=4G --direct=1 \
--rw=randrw --rwmixread=70 --bs=4k --iodepth=32 --numjobs=4 \
--ioengine=libaio --runtime=60 --time_based --group_reporting
--direct=1 bypasses the page cache. Report IOPS, throughput and latency percentiles (p99). On cloud volumes, newly restored EBS volumes need initialization first, and gp3/io2 provisioned IOPS and throughput caps dominate results.
More on Performance & the USE Method
What is the USE method?BeginnerMap the USE method to concrete Linux commands.IntermediateWhat is your "first 60 seconds" checklist on a slow server?IntermediateHow do you read vmstat output?IntermediateHow do you read `iostat -xz 1`?IntermediateWhat is sar and why install sysstat on every server?Beginner