VPS Benchmarking: Tests and Results That Matter
In this article
Benchmarking a VPS tells you whether the provider's advertised specs match the real performance you'll get for your workload. A quick CPU score alone won't reveal disk latency problems or network bottlenecks, so this guide walks you through a practical, repeatable benchmark suite and how to interpret the results. You'll need SSH access to your VPS and a basic comfort with the command line.
What You'll Need
- SSH access to your VPS (root or a user with sudo privileges)
- A terminal client (PuTTY on Windows, Terminal on macOS/Linux)
- Internet connection to download benchmark tools
- At least 10 minutes of uninterrupted time per test run
- A notepad or spreadsheet to record results
Step-by-Step
- Prepare your environment. Log in via SSH and run
sudo apt update && sudo apt upgrade(Debian/Ubuntu) orsudo yum update(CentOS/RHEL). This ensures your system is up-to-date before benchmarking, as background updates can skew results. - Install necessary tools. Install
sysbench,fio,iperf3, andcurl. On Debian/Ubuntu:sudo apt install sysbench fio iperf3 curl. On CentOS/RHEL:sudo yum install sysbench fio iperf3 curl. If a package isn't available, use your package manager's search to find the correct name. - Run a CPU benchmark. Use sysbench to test CPU performance:
sysbench cpu --threads=1 --time=30 runand thensysbench cpu --threads=4 --time=30 run(adjust thread count to match your VPS vCPU count). Record the events per second (higher is better). This measures raw compute power. - Test memory speed. Run
sysbench memory --memory-block-size=1M --memory-total-size=10G --threads=1 run. Record the transferred MiB/sec. This shows memory bandwidth, which matters for databases and caching. - Benchmark disk I/O. Use fio for realistic disk tests. Run
fio --name=randread --rw=randread --bs=4k --size=1G --iodepth=32 --runtime=30 --numjobs=1 --time_based --group_reportingfor random reads, then repeat with--rw=randwritefor writes. Record IOPS and latency (avg, p99). Also run a sequential test:fio --name=seqread --rw=read --bs=1M --size=2G --iodepth=32 --runtime=30 --numjobs=1 --time_based --group_reportingand the write variant. Record throughput in MB/s. - Measure network speed. For network testing, you need a second server. You can use a public iperf3 server (e.g., from a provider like Hetzner or DigitalOcean) or spin up a temporary VPS. On your VPS, run
iperf3 -cto test download, and-t 30 iperf3 -cfor upload. Record the average bitrate. If you don't have a second server, skip this step; network tests are less critical for many workloads.-t 30 -R - Run a comprehensive suite (optional). Tools like
unixbenchorGeekbench(if available) provide a single score. Install unixbench withsudo apt install unixbenchand run./Runfrom the install directory. This gives a composite score useful for comparing providers, but it's not as detailed as individual tests. - Repeat tests for consistency. Run each benchmark at least twice, ideally at different times of day. VPS performance can vary due to noisy neighbors (other VMs on the same host). Record all results and take the median or average.
- Document your results. Create a table with columns: test name, metric, result, and date. Include the VPS plan, provider, and location. This makes it easy to compare with future tests or other providers.
- Interpret the results. Focus on what matters for your use case. For a web server, disk latency (p99) and network throughput are key. For a database, random read/write IOPS and memory bandwidth matter. For CPU-heavy tasks like video encoding, the CPU events/sec is most important. Compare your numbers to published benchmarks for similar VPS plans, but remember that real-world performance depends on many factors.
Common Mistakes
- Benchmarking during peak hours. If you run tests during busy periods, you may see inflated latency or reduced throughput due to host contention. Run tests at different times and look for consistency.
- Not warming up the disk. Some fio tests benefit from a warm-up phase. Use
--ramp_time=10to let the test stabilize before measuring. - Using too small a file size. A 100MB file may be cached by the OS, giving unrealistic results. Use at least 1GB for disk tests.
- Ignoring latency percentiles. Average latency can be misleading. Always look at the 99th percentile (p99) to see worst-case performance.
- Comparing results across different hardware. Don't compare a VPS with NVMe storage to one with SATA SSD. Note the storage type in your results.
- Running benchmarks on a loaded system. Ensure no other heavy processes are running. Use
toporhtopto check before starting.
Tips
- Use a script to automate. Write a shell script that runs all benchmarks and saves output to a file. This ensures consistency and saves time.
- Test from multiple locations. If you have a global audience, run network tests from a server in a different region to see how latency varies.
- Keep a baseline. Run the same suite after any major system change (kernel update, new software) to see if performance has changed.
- Look for sustained performance. Some VPS providers throttle CPU after a burst period. Run a longer CPU test (e.g., 5 minutes) to see if performance drops.
- Check for virtualization overhead. Use
lscputo see if the CPU is a shared model. If it's a low-end Xeon or EPYC, expect lower per-core performance.
Troubleshooting
- Command not found. If a tool isn't installed, try
sudo apt installorsudo yum install. If it's still not found, your distro may use a different package name; search withapt searchoryum search. - Permission denied. Some benchmarks need root. Use
sudobefore the command. If you get a permission error on fio, ensure you have write access to the directory where you're running the test (use/tmpif necessary). - Network test fails. If iperf3 can't connect, check that the server is running
iperf3 -sand that port 5201 is open in the firewall. If you're using a public server, it may be down; try another. - System freezes during disk test. This can happen if the disk is very slow. Reduce the file size (e.g., from 2G to 1G) and the
--runtimeto 20 seconds. Also, ensure you have enough free RAM; use--direct=1to bypass the page cache if needed. - Results vary wildly between runs. This is normal on shared VPS. Run each test 3 times and take the median. If the variation is extreme (more than 50%), it may indicate a noisy neighbor; consider contacting your provider.
Frequently Asked Questions
What is the single most important benchmark for a VPS?
There's no single answer—it depends on your workload. For web hosting, disk latency (p99) is critical. For databases, random IOPS matter. For CPU-bound tasks, CPU events/sec. Run the full suite and focus on the metrics that align with your use case.
How do I know if my VPS is being throttled?
Run a CPU benchmark for 5 minutes and watch the events/sec over time. If it drops significantly after the first minute, the provider is likely throttling. Also, check for a `cpulimit` process or CPU steal time in `top` (the `st` column). High steal time indicates contention.
Can I benchmark network speed without a second server?
Yes, you can use a public iperf3 server. Many providers offer them, such as `iperf.he.net` (port 5201). However, results may be affected by your ISP and the server's location. For accurate results, use a server in the same region as your target audience.
Should I benchmark before or after installing my application?
Benchmark the bare OS first to get a baseline. Then install your application and re-run the benchmarks to see how much overhead it adds. This helps you understand if your app is the bottleneck or the VPS itself.
How often should I re-benchmark my VPS?
Re-benchmark after any major change (kernel update, provider migration, plan change) and at least quarterly to detect long-term performance degradation. If you notice a sudden slowdown, run the tests immediately.
What is a good score for a VPS?
There's no universal good score. Compare your results to the provider's advertised specs and to other VPS plans in the same price range. Online communities like LowEndTalk often share benchmark results for various providers—use those as a reference, but remember that real-world performance varies.