How to benchmark a VPS with YABS (and read the results)
Updated
Contents
YABS (Yet Another Bench Script) is an open-source Linux script that tests CPU, disk and network with one command. Its output is consistent, which makes it easy to compare providers. The benchmark data on this site is imported from YABS runs.
Before you run it
- A full run takes ten minutes or more and saturates the CPU, disk and network, so do not run it on a production server;
- The script downloads Geekbench, fio and iperf3 temporarily and cleans up afterwards;
- Start it inside
screenortmuxso a dropped SSH session does not kill the test; - When comparing two servers, run them at similar times of day; evening and early-morning results can differ.
Run it
curl -sL https://yabs.sh | bash
Useful flags:
-iskips the iperf network tests;-gskips Geekbench;-fskips the fio disk tests;-jprints the results as JSON;-w filewrites the JSON to a file.
Flags change between versions, so check the script's help.
Reading the results
System information
The header lists the CPU model, core count, memory, disk and virtualization type. Check them against what you paid for first; if the cores or memory do not match, the scores hardly matter.
CPU: Geekbench
Look at both the single-core and multi-core scores:
- Websites, databases and most back-end software lean on single-core speed;
- Multi-core matters for work that parallelises, such as builds and transcoding;
- Multi-core should grow roughly with the number of cores. If four cores score barely above one, the cores may be throttled.
If the same plan scores very differently on different days, the host is probably oversold and neighbours are competing for CPU.
Disk: fio 4k and 1m
fio runs mixed read/write tests at several block sizes. The two to watch:
- 4k random read/write is closest to real database and small-file workloads, and matters most;
- 1m sequential is what you see when copying large files or taking backups.
NVMe disks usually post far higher 4k numbers than SATA SSDs, and spinning disks are an order of magnitude slower again. A low 4k result means a sluggish site or database, however good the 1m figure looks.
Network: iperf3
YABS tests upload (send) and download (receive) against several public iperf servers, usually over both IPv4 and IPv6. What matters is how close you get to the port speed and how consistent it is. One slow server is usually just that server being busy; slow results across the board point to the VPS. Note that iperf only measures speed to those servers, not the route to your own users.
Spotting an oversold host
Two quick checks beyond the scores:
- Steal time: in
top, thestvalue on the CPU line should stay near zero; a persistently high value means other virtual machines on the host are taking your CPU time; - Run it again a few days later: large swings are a sign of overselling.
Other useful tools
- fio on its own, for detailed disk tests with your own read/write mix and queue depth;
- sysbench for CPU, memory and database load;
- UnixBench, an older all-round benchmark with lots of historical results, but slow;
- speedtest-cli for bandwidth to the nearest speed-test server.
Using benchmarks to choose
- Put the single-core and 4k results of plans at the same price side by side;
- Re-run after a few days; unstable results are a warning sign;
- Benchmarks measure performance only. Network quality, uptime and support matter just as much;
- Best of all, deploy what you actually plan to run and watch it for a week.
Common mistakes
- "Higher is always better." For a small blog, decent single-core speed is enough; extra cores are wasted money.
- "One run tells you everything." Neighbours change; test again in a few months.
- "Fast iperf means fast for my users." It only tells you about the route to the test servers.