Skip to content

This is How You Test Your VPS Performance

Here’s a simple, reliable toolkit for Ubuntu that covers CPU, RAM, disk (seq + random), and network. You can run the “easy mode” first, then a more realistic, apples-to-apples suite.

Here’s a simple, reliable toolkit for Ubuntu that covers CPU, RAM, disk (seq + random), and network. You can run the “easy mode” first, then a more realistic, apples-to-apples suite.

Quick sanity check (1 command)

This gives you CPU, disk, and network in one shot.

curl -sL yabs.sh | bash

It runs Geekbench (CPU), fio (disk), and iperf3/speed tests. Do it on both VPSes first to get a rough ranking.

Deeper, controlled benchmarks

Install the tools once:

sudo apt update
sudo apt install -y sysbench fio iperf3 ioping nvme-cli smartmontools

1) CPU & Memory (sysbench)

CPU throughput (multi-core)

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

Note: compare events per second; higher is better.

Memory bandwidth

sysbench memory --memory-total-size=16G --memory-block-size=4K --threads=$(nproc) --time=30 run
sysbench memory --memory-total-size=16G --memory-block-size=1M --threads=$(nproc) --time=30 run

4K = small random-like; 1M = large sequential-like. Compare MiB/sec and latency.

2) Disk I/O (fio) — realistic, cache-safe

Important: Test on a non-critical mount with enough free space. Use a file larger than RAM (e.g., 2× RAM) and direct=1 to bypass page cache.

First pick a target directory (e.g., /mnt/benchmark). Create it if needed:

sudo mkdir -p /mnt/benchmark && sudo chown "$USER":"$USER" /mnt/benchmark

Sequential write/read (throughput in MB/s)

# 16G file; adjust if your RAM is huge
fio --name=seqwrite --directory=/mnt/benchmark --size=16G --bs=1M --rw=write \
    --iodepth=32 --numjobs=1 --direct=1 --sync=1

fio --name=seqread --directory=/mnt/benchmark --size=16G --bs=1M --rw=read \
    --iodepth=32 --numjobs=1 --direct=1

Random 4K (IOPS & latency — most web backends care about this)

# Random write
fio --name=randwrite4k --directory=/mnt/benchmark --size=16G --bs=4k --rw=randwrite \
    --iodepth=64 --numjobs=4 --direct=1 --time_based --runtime=60 --group_reporting

# Random read
fio --name=randread4k --directory=/mnt/benchmark --size=16G --bs=4k --rw=randread \
    --iodepth=64 --numjobs=4 --direct=1 --time_based --runtime=60 --group_reporting

Tip: Focus on IOPS, avg/99% latency, and BW. For NVMe, you want very high IOPS and sub-millisecond p99 if possible.

Mixed read/write (more like databases)

fio --name=mixed4k --directory=/mnt/benchmark --size=16G --bs=4k --rw=randrw \
    --rwmixread=70 --iodepth=64 --numjobs=4 --direct=1 --time_based --runtime=60 --group_reporting

Filesystem metadata snappiness (ioping)

ioping -c 20 /mnt/benchmark

Gives you feel for latency in microseconds/ms.

Cleanup test files later:

rm -f /mnt/benchmark/*.0.* /mnt/benchmark/seq* /mnt/benchmark/rand*

3) Network (iperf3)

Use one VPS as server, the other as client. On server:

iperf3 -s

On client (replace IP):

iperf3 -c  -P 4 -t 30

Add -R for reverse. Try with and without -P 4 (parallel streams). Compare Mbits/sec and retransmits.

(If you don’t have a second box to test against, install Ookla CLI: curl -fsSL https://cli.install.speedtest.net/sh | sudo bash && speedtest)

4) Drive health & model (helps interpret results)

lsblk -o NAME,MODEL,SIZE,TYPE,MOUNTPOINT
sudo nvme list 2>/dev/null || true
sudo smartctl -a /dev/sda 2>/dev/null || sudo smartctl -a /dev/nvme0

This confirms NVMe vs SATA and basic health.

Optional stress & soak

  • stress-ng to check stability under load: sudo apt install -y stress-ng stress-ng --cpu 0 --vm 2 --vm-bytes 75% --timeout 120s --metrics-brief

  • Watch system during tests: sudo apt install -y dstat dstat -tcmndl --top-cpu --top-io

A fair comparison protocol (copy/paste)

  1. Reboot both VPSes (if you can) to normalize cache/thermals.

  2. Ensure no big background tasks (db backups, apt upgrades).

  3. Run: yabs.sh (quick snapshot).

  4. Run exactly the same sysbench + fio commands above, same sizes and durations.

  5. Record:

  • CPU: events/s; single vs multi (set --threads=1 once to get single-core).
  1. Memory: MiB/s (4K and 1M).

  2. Disk: seq MB/s; 4k random IOPS and p99 latency.

  3. Network: iperf3 Mbits/s and retransmits.

A) CPU-only via YABS (quickest)

This skips disk and network, runs only Geekbench 6 CPU:

curl -sL https://yabs.sh | bash -s -- -f -i
  • -f = skip fio (disk)

  • -i = skip iperf (network) YABS will download/run Geekbench 6 and print single-core and multi-core scores plus a result URL. (GitHub)

B) Run Geekbench 6 directly (no wrappers)

  1. Download Linux build, extract, run:
cd /tmp
curl -L -o geekbench.tgz https://cdn.geekbench.com/Geekbench-6.3.0-Linux.tar.gz
tar xzf geekbench.tgz
cd Geekbench-6.*-Linux
./geekbench6

This launches the CPU benchmark (it’s the default); at the end you’ll get single-core and multi-core scores and a results link. (geekbench.com)

Follow

Enjoyed this post?

Follow along for more articles about language, AI, and tech experiments.