How to Benchmark a VPS in 2026: CPU, Disk and Network Tests

0
(0)

A VPS benchmark is a controlled measurement of CPU, disk and network performance on one plan, at one time, with the tools and settings written down. It is not a league table of hosting companies, and a single run is not a verdict on a provider. Used carefully, it tells you whether the instance you just bought can do the work you have in mind, and it gives you a baseline before traffic, a kernel change or a migration.

This guide covers practical tests with sysbench, fio and iperf3, plus the conditions that make those numbers comparable. It does not recommend a commercial plan or publish a provider ranking.

What a useful VPS benchmark includes

Resource What to measure A reasonable first tool
CPU Sustained work on all vCPUs, plus a single-thread check if the app is lightly threaded sysbench cpu
Memory Sequential and random access at a size that fits RAM, so you are not measuring swap sysbench memory
Disk Random I/O and a sequential pass, with queue depth and duration recorded fio
Network Throughput to a nearby host you control, in both directions iperf3
Interference CPU steal, iowait and memory pressure during the test top, vmstat, iostat

The last row is as important as the first four. A fast CPU result collected during high steal is not the same as a fast CPU result on a quiet host. The CPU steal time guide explains that metric, and the Linux monitoring guide covers the other counters you should watch while a test runs.

Set the conditions before you run anything

Install the tools on a quiet VPS, then record the environment:

cat /etc/os-release
nproc
free -h
lsblk -d -o NAME,SIZE,ROTA,TRAN,MODEL
df -hT
# Ubuntu/Debian
sudo apt update
sudo apt install sysbench fio iperf3 -y

Write down the region, the plan size, the disk type if you know it, the kernel version, and whether anything else is running. Stop cron-heavy jobs, backups and production traffic if you can. A WordPress site taking orders during a disk test will skew both the shop and the result.

Run each test more than once, at different times of day if the decision matters. Keep the flags identical when you compare two VPS plans. Changing the fio block size or the sysbench thread count mid-comparison makes the numbers decorative.

See also  How to Run Your Own Git Server in 2026: Install and Configure a Git Server on a Linux VPS

Do not benchmark only from a speed-test website in a browser. Those tools can be useful as a rough network check, but they do not measure your disk and they rarely document the path they used. For transfer caps versus port speed, use the bandwidth vs port speed guide alongside iperf3.

CPU and memory with sysbench

Start with a CPU run that uses one thread, then a run that uses every vCPU:

sysbench cpu --cpu-max-prime=20000 --threads=1 run
sysbench cpu --cpu-max-prime=20000 --threads=$(nproc) run

Record the events per second and the wall time, not only a vague β€œit felt fine.” If the multi-thread result barely beats the single-thread result on a four-vCPU plan, check whether those vCPUs are already busy, or whether steal is high during the test:

LC_ALL=C top -b -d 2 -n 8

Memory tests should fit in RAM. A buffer larger than physical memory measures swap and disk, which is a different question:

sysbench memory --memory-block-size=1K --memory-total-size=2G --threads=1 run
sysbench memory --memory-block-size=1K --memory-total-size=2G --memory-oper=write --threads=$(nproc) run

Adjust --memory-total-size so it stays well below available memory on a small VPS. Watch free -h and swap activity while it runs. Official flags and output fields are described in the sysbench documentation.

Disk with fio

Disk tests need a target file on the filesystem you care about, a known block size, and a duration long enough to get past cache. A five-second run on a warm page cache can look heroic and say nothing about the disk. The SSD vs HDD guide explains why random I/O and sequential I/O tell different stories; your benchmark should include both.

Create a working directory and run a 4K random read, then a 4K random write, then a sequential pass. These examples use a 2 GB file and a 60-second run. On a very small disk, shrink the file size so you leave free space:

mkdir -p /var/tmp/vpsbench
cd /var/tmp/vpsbench

fio --name=randread --filename=bench.bin --size=2G --rw=randread \
  --bs=4k --iodepth=16 --ioengine=libaio --direct=1 --runtime=60 \
  --time_based --group_reporting

fio --name=randwrite --filename=bench.bin --size=2G --rw=randwrite \
  --bs=4k --iodepth=16 --ioengine=libaio --direct=1 --runtime=60 \
  --time_based --group_reporting

fio --name=seqread --filename=bench.bin --size=2G --rw=read \
  --bs=1M --iodepth=4 --ioengine=libaio --direct=1 --runtime=60 \
  --time_based --group_reporting

Record IOPS, bandwidth and latency (especially p95 or p99 if fio prints them). direct=1 bypasses the page cache so you are closer to the virtual disk. That is what you want for a storage comparison. It is also harder on the disk than a normal website, so do not loop write tests on a nearly full volume, and delete the test file when you are done:

rm -f /var/tmp/vpsbench/bench.bin

If latency is high and iostat shows a busy device, you are looking at storage or the path to storage, not at a slow CPU. Check iostat -xz 1 10 during the run and keep those numbers with the fio output so you can tell a cached burst from a saturated virtual disk.

See also  Port Ping: How to Ping a Specific Port in Linux and Windows

The fio documentation is the reference for job files and output fields. Keep the job file if you plan to rerun the test in a month.

Network with iperf3

Use a second VPS or a host you control, preferably in a nearby region. A public iperf server can be congested or far away:

# on the other host
iperf3 -s

# on the VPS under test
iperf3 -c TEST_HOST
iperf3 -c TEST_HOST -R

Record both directions, the TCP window if the output shows it, and any retries. CPU can cap a small VPS on a 1 Gbps or 10 Gbps port, especially with encryption. If iperf3 is far below the advertised port speed to a nearby host, you have a useful question for yourself or the provider. If the nearby test is fine and a distant user is slow, the port is probably not the first problem. Run the test twice, and keep an SSH session with top or mpstat 1 open on the VPS so you can see whether the bottleneck is the NIC or the CPU sitting at 100 percent. A single short stream may also underfill a high-speed port; if the plan advertises 10 Gbps and one TCP stream tops out early, try a second parallel stream only as a follow-up, and record that you changed the method.

Write a short report you can rerun

A benchmark you cannot reproduce is just a story. Keep a text file on the VPS, or with your build notes, that a future you can follow:

date -u
hostnamectl
nproc; free -h; df -hT
uname -r
# paste the exact sysbench, fio and iperf3 commands
# paste the summaries: events/s, IOPS, p99 latency, iperf3 bitrate
# paste steal, iowait and memory from the same window

If you compare two regions or two plan sizes, change one variable at a time. Moving from a 2 GB plan in one city to an 8 GB plan in another city, on a different virtualization type, will not tell you which change mattered. If the application is a database, add a realistic workload test after the synthetic tools: a backup restore, a migration, or a known query set. Synthetic IOPS are a starting point, not a substitute for the job the VPS is supposed to do.

See also  Bandwidth vs Port Speed on a VPS in 2026: Transfer Caps and Throughput

Be careful with shared temporary directories and almost-full disks. fio will fail or behave oddly if the volume cannot hold the test file, and write tests on a 95 percent full disk can affect production files on the same filesystem. Prefer /var/tmp/vpsbench on the data disk you care about, not a tiny boot volume, unless the boot volume is the one you intend to measure.

How to read the results without fooling yourself

Compare like with like: same test flags, similar plan size, similar OS, and more than one sample. A 20 percent gap on one evening run is not a conclusion. A repeatable gap in disk latency, with iowait and queue data to match, is a finding.

Do not convert a CPU events-per-second figure into a marketing claim about β€œthe fastest VPS.” Do not average unlike tests. And do not ignore the application. A database cares about fsync latency. A static site may never notice a mediocre 4K write score. After you have a baseline, keep it with the rest of the build notes from the VPS setup guide so a later change has something to compare against.

Frequently asked questions

Should I use Geekbench or a web speed test instead?

You can, as a supplement, if you record the exact version and settings. They are harder to control and easier to misread than sysbench, fio and iperf3. For a VPS you administer, start with the tools you can rerun on the box.

How long should a disk test run?

Long enough to get past cache and short bursts. Sixty seconds is a practical minimum for the examples above. Important decisions deserve several minutes and a repeat at another time of day.

Can I benchmark a production VPS?

You can take light CPU or network samples, but a heavy fio write test will compete with the live workload and can wear on the disk. Prefer a snapshot, a staging clone, or a maintenance window.

Why did two identical plans score differently?

The host may have been busier, the disk placement may differ, or the path to your iperf target changed. Repeat the test, watch steal and iowait, and only then treat the gap as real.

Does a higher score mean I should switch providers?

Not by itself. Look at the resource your application actually uses, the repeatability of the result, and operational factors this article does not measure, such as backups and support. A benchmark is evidence, not a purchase order.

Sources

Was this guide helpful?

Rate this guide from 1 to 5 stars.

Average rating: 0 / 5. Ratings: 0

No ratings yet. Be the first to rate this guide.

Leave a Comment