VPS Disk and Network Speed Test: dd, fio, speedtest
Disk speed on a VPS is quickly measured with dd (sequential write) and more accurately with fio (random-access IOPS), while network throughput is measured by speedtest-cli. Below are the exact commands and how to read the results.
What to measure and with what
- Sequential disk speed (MB/s) —
dd, a simple reference point. - IOPS and random access —
fio, the real workload of databases and web applications. - Network speed to the internet —
speedtest-cli. - Throughput between servers —
iperf3.
Disk test with dd
A quick sequential write check. We write a 1 GB file:
dd if=/dev/zero of=/root/testfile bs=1M count=1024 oflag=direct
oflag=direct bypasses the OS cache and shows the real disk speed. At the end of the output you will see a line like 1073741824 bytes ... copied, 2.5 s, 429 MB/s.
Delete the test file:
rm -f /root/testfile
dd is convenient but says nothing about random access. That is what fio is for.
Accurate testing with fio
Installation:
apt install -y fio
Random read/write (a typical workload)
fio --name=randrw --ioengine=libaio --direct=1 \
--rw=randrw --rwmixread=70 --bs=4k --size=1G \
--numjobs=4 --runtime=60 --group_reporting
What to look at in the output:
- IOPS — operations per second (the key figure for databases);
- BW — bandwidth;
- lat (latency) — response delay.
Random 4k write (write-heavy load)
fio --name=randwrite --ioengine=libaio --direct=1 \
--rw=randwrite --bs=4k --size=1G --numjobs=1 \
--runtime=30 --group_reporting
Remove the temporary fio files afterwards:
rm -f randrw.* randwrite.*
Performance reference points
| Disk type | Sequential write | 4k IOPS |
|---|---|---|
| HDD | 80–160 MB/s | 100–200 |
| SATA SSD | 300–500 MB/s | 10–40 thousand |
| NVMe SSD | 1–3+ GB/s | 100+ thousand |
On a virtual server the numbers also depend on the neighbours on the host and on hypervisor limits.
Network speed test with speedtest-cli
Install the official Ookla client:
apt install -y speedtest-cli
Run it:
speedtest-cli
The tool picks the nearest server and reports ping, download and upload. To use a specific server:
speedtest-cli --list | head
speedtest-cli --server <ID>
Server-to-server test with iperf3
Useful for checking the link between your own machines. On the receiving server:
apt install -y iperf3
iperf3 -s
On the second server (the client):
iperf3 -c <first_server_IP>
The output shows the real throughput of the link in both directions.
Checking latency
ping -c 10 8.8.8.8
mtr -rwc 100 8.8.8.8
mtr shows packet loss and latency at every hop along the route.
Disk test with sysbench
sysbench is handy for an all-round assessment. Install it and prepare the files:
apt install -y sysbench
sysbench fileio --file-total-size=2G prepare
Random read/write test:
sysbench fileio --file-total-size=2G --file-test-mode=rndrw \
--time=60 --max-requests=0 run
Clean up after the test:
sysbench fileio --file-total-size=2G cleanup
sysbench can also stress the CPU (sysbench cpu run) and memory (sysbench memory run), which is useful for a general picture of the VPS.
Testing a real download
A quick practical test is to download a large file and look at the actual link speed:
curl -o /dev/null http://speedtest.selectel.ru/100MB
wget -O /dev/null http://speedtest.selectel.ru/100MB
curl prints the average speed at the end. This reflects a real download rather than an idealised speedtest.
How to interpret the results
- Run every test 3–5 times and take the average — a single measurement can land on a peak of neighbour activity.
- Test on an idle (non-production) server: parallel processes distort the numbers.
- Compare against the reference table above rather than against absolute records — on virtualisation, consistency matters more than peak figures.
- For databases latency matters more than bandwidth: even a fast disk with high latency will slow the application down.
Frequently asked questions
Why does dd show different speeds on repeat runs?
Without oflag=direct the data lands in the OS cache and the numbers are inflated. Always use oflag=direct for a real result.
What matters more, sequential speed or IOPS? For databases and web applications, IOPS and random-access latency are critical, not sequential throughput.
Network speed is below the advertised figure — is that normal? Speedtest results depend on the server you pick and on link utilisation. Try several servers and different times of day.
Do neighbours on the host affect the result? On a virtual server, yes. Figures can fluctuate, so measure several times at different hours.
How do I test the disk without installing fio?
With dd and oflag=direct — rough but fast. For accurate IOPS you still need fio.
Need consistent performance? Take a VPS plan on NVMe or a VPS for security and VPN. Sizing and optimisation can be handled by Server administration.