Benchmarking Cloud VPS Disks with FIO: Storage Performance
Design realistic storage stress tests using Flexible I/O Tester (FIO) to measure 4K random IOPS, sequential bandwidth, and 99.9th percentile latencies.
Netbay Cloud Team
Netbay Engineering
On this page
Accurately benchmarking disk performance on cloud servers is often misunderstood. Simple tests using the dd command (such as dd if=/dev/zero of=test.bin) fail to simulate real workloads: dd writes large sequential streams of zeroed memory that are trivially compressed by modern storage controllers and absorbed entirely into the RAM page cache. The resulting figures report multi-gigabyte numbers that bear zero resemblance to production database performance.
Flexible I/O Tester (FIO) is the enterprise industry standard for storage benchmarking. FIO bypasses the page cache with direct I/O (O_DIRECT), generates cryptographically random payloads that defeat storage compression tricks, simulates multi-threaded database access patterns, and reports granular 99th and 99.9th percentile latency distributions.
Authoring an Enterprise FIO Benchmark Job
Create a comprehensive multi-test job configuration file at benchmark.fio:
# benchmark.fio
[global]
ioengine=io_uring
direct=1
runtime=45
time_based=1
filename=/tmp/fio_benchmark.tmp
size=8G
group_reporting=1
# Test 1: High concurrency 4K random read (OLTP reads)
[4k-random-read]
rw=randread
bs=4k
iodepth=64
numjobs=4
# Test 2: Synchronous 4K random write (Database WAL flush)
[4k-random-write]
rw=randwrite
bs=4k
iodepth=16
numjobs=2
stonewall
# Test 3: Large block sequential throughput
[1m-sequential-throughput]
rw=read
bs=1M
iodepth=16
numjobs=1
stonewall
# Test 4: Realistic 70% read / 30% write mixed profile
[70-30-mixed-database]
rw=randrw
rwmixread=70
bs=8k
iodepth=32
numjobs=4
stonewallExecuting the Test and Interpreting Output
Execute the job and inspect both raw text summaries and JSON output:
# Run FIO with output redirection
sudo fio benchmark.fio --output=benchmark-results.txt
# Inspect IOPS and 99th percentile latency for the mixed database test
grep -A 10 "70-30-mixed-database" benchmark-results.txt | grep -E "IOPS|clat percentiles"Critical metrics to evaluate:
- clat (Completion Latency): The duration elapsed between submitting the I/O to the kernel and receiving hardware completion.
- Percentiles (99.00th, 99.90th): If p99.9 exceeds 15ms during mixed workloads, your storage backend is experiencing queue saturation.
Storage Performance Video
Explore RAID arrays, disk striping, and storage throughput dynamics in this overview:
Avoiding Drive Wear during Benchmarks
When testing storage on cloud instances, always remove benchmark scratch files immediately following job completion with rm -f /tmp/fio_benchmark.tmp. For flash-based SSDs, executing fstrim -v / after extensive benchmarking informs the controller to reclaim discarded flash blocks via background garbage collection.
Benchmark consistent High-Speed SSD performance on your own instance at netbayhosts.in.
Keep reading
Follow along on a real VPS
Deploy Linux in under 60 seconds
These guides are written against Ubuntu, Debian, and RHEL-family images — the same ones on NetBay.
Deploy an instance