How to Benchmark VPS Disk I/O Performance (fio, dd)

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

MetricMeaning
IOPSI/O operations per second — critical for random access workloads (databases)
Bandwidth (MB/s)Throughput — more relevant for large sequential transfers
LatencyTime 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

Browse more articles in Performance & Monitoring.

  • fio disk benchmark, vps disk performance test, dd benchmark linux, iops throughput testing
  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

How to Install Netdata for Real-Time VPS Monitoring

Netdata provides a real-time, highly detailed web dashboard showing CPU, memory, disk, network,...

How to Set Up Prometheus and Grafana for VPS Monitoring

Prometheus collects and stores time-series metrics, while Grafana visualizes them in customizable...

How to Set Up Uptime Monitoring for Your Website

Uptime monitoring alerts you the moment your website or application goes down — ideally...

How to Set Up Centralized Logging Across Multiple VPS Instances

When running multiple servers, checking logs individually on each one is slow and error-prone...

How to Profile and Optimize Slow Application Requests

When a server has plenty of free CPU and RAM but specific requests are still slow, the bottleneck...