Understanding your VPS's actual disk performance — not just the advertised specs — helps you diagnose whether storage is a genuine bottleneck and verify you're getting the performance your plan promises.
Why Benchmark Disk I/O
Advertised specs don't always reflect sustained real-world performance under your specific workload — benchmarking gives you concrete numbers for comparison, troubleshooting, and verifying your provider is delivering expected performance.
Quick Test with dd (Simple, Sequential)
dd if=/dev/zero of=testfile bs=1M count=1024 oflag=direct
Writes 1GB directly to disk, bypassing cache, reporting throughput — a quick, simple sequential write test, though not representative of typical mixed random I/O workloads.
Cleaning Up the Test File
rm testfile
More Comprehensive Testing with fio
sudo apt install fio -y
fio (Flexible I/O Tester) is the standard, much more capable tool for realistic disk benchmarking, supporting various I/O patterns matching real-world workloads.
Sequential Read Test
fio --name=seqread --rw=read --bs=1M --size=1G --numjobs=1 --runtime=30 --group_reporting
Sequential Write Test
fio --name=seqwrite --rw=write --bs=1M --size=1G --numjobs=1 --runtime=30 --group_reporting
Random Read/Write Test (More Representative of Database Workloads)
fio --name=randrw --rw=randrw --bs=4k --size=1G --numjobs=4 --runtime=30 --group_reporting --rwmixread=70
Random I/O with a mix of reads/writes more closely resembles typical database and application workloads compared to simple sequential tests.
Understanding Key fio Output Metrics
| Metric | Meaning |
|---|---|
| IOPS | I/O operations per second — critical for random access workloads (databases) |
| Bandwidth (MB/s) | Throughput — more relevant for large sequential transfers |
| Latency | Time per I/O operation — particularly important for responsive application performance |
Testing with Different Block Sizes
fio --name=test --rw=randread --bs=4k --size=1G --runtime=30
fio --name=test --rw=randread --bs=64k --size=1G --runtime=30
Different workloads have different typical I/O sizes — databases often use small block sizes (4-16KB), while media/backup operations use larger blocks; test with block sizes representative of your actual workload.
Comparing Results Against Your Plan's Expectations
If your VPS provider advertises specific IOPS or throughput figures, compare your benchmark results against these — a significant, consistent shortfall is worth raising with support.
Avoiding Cache-Skewed Results
--direct=1
Always use direct I/O (bypassing OS page cache) for benchmarks intended to reflect actual disk performance — without this, results may reflect fast RAM cache performance rather than genuine disk throughput.
Being a Considerate Neighbor
Intensive disk benchmarking briefly stresses your VPS's storage subsystem — run benchmarks during low-traffic periods for your own applications, and be aware that on shared infrastructure, sustained heavy benchmarking could be noticed by your provider.
Common Errors
Results seem inconsistent between test runs — normal to some degree on shared/virtualized infrastructure; run multiple tests and consider the average/typical result rather than a single measurement as definitive.
Continue Reading
- How to Diagnose High Disk I/O Wait and Slow Storage Performance
- How to Benchmark CPU Performance on a VPS
- How to Choose the Right VPS Plan for Your Workload
Browse more articles in Performance & Monitoring.