VPS Benchmarking: How to Test CPU, RAM, Disk, and Network Performance
Before committing to a VPS provider — or after upgrading your plan — benchmarking gives you objective data on what your server actually delivers. Marketing specs say “2 vCPU and 4 GB RAM” but don’t tell you the CPU’s single-thread performance, actual I/O throughput under load, or whether your allocated RAM is real or oversold.
This guide covers the standard Linux benchmark tools for CPU, memory, disk, and network performance — with reference numbers to help you interpret results.
Why Benchmark Your VPS?
- Verify you’re getting the resources you’re paying for
- Compare performance before and after plan upgrades
- Identify bottlenecks (is it CPU, RAM, or disk slowing your app?)
- Compare providers objectively when making hosting decisions
- Establish a baseline for monitoring performance degradation over time
Quick Benchmark: One-Line VPS Test Script
The most widely used quick benchmark script for VPS providers:
# bench.sh — tests CPU, memory, disk, and network speed
wget -qO- bench.sh | bash
# Or the more detailed version:
curl -Lso- bench.sh | bash
This script runs in 2–5 minutes and outputs CPU info, memory, disk speed, and download/upload speeds from multiple global servers. It’s the standard quick test used by VPS review sites.
Part 1: CPU Benchmarks
sysbench — CPU single and multi-thread
sudo apt install sysbench -y
# Single-thread CPU test (prime numbers calculation)
sysbench cpu --cpu-max-prime=20000 --threads=1 run
# Multi-thread CPU test (all cores)
sysbench cpu --cpu-max-prime=20000 --threads=$(nproc) run
Key metric: events per second — higher is better.
| Result (events/sec, single-thread) | Performance tier |
|---|---|
| Under 500 | Low — shared/budget VPS |
| 500–1,000 | Moderate — typical KVM VPS |
| 1,000–2,000 | Good — newer CPU, dedicated vCPU |
| 2,000+ | Excellent — high-end CPU or bare metal |
stress-ng — sustained CPU load
sudo apt install stress-ng -y
# Stress test all CPU cores for 60 seconds
stress-ng --cpu $(nproc) --timeout 60s --metrics-brief
# Watch temperature and throttling (if applicable)
watch -n 1 "cat /proc/loadavg"
UnixBench — comprehensive benchmark
sudo apt install perl make gcc -y
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/byte-unixbench/UnixBench5.1.3.tgz
tar xvfz UnixBench5.1.3.tgz
cd UnixBench
./Run
UnixBench runs a comprehensive suite including CPU, floating point, pipe throughput, and context switching. It takes 10–15 minutes but gives the most complete CPU picture. A single-core score of 800–1200 is typical for a modern KVM VPS vCPU.
Part 2: Memory Benchmarks
sysbench memory test
# Memory bandwidth test (sequential read)
sysbench memory --memory-block-size=1K --memory-total-size=10G \
--memory-access-mode=seq run
# Random memory access
sysbench memory --memory-block-size=1K --memory-total-size=10G \
--memory-access-mode=rnd run
Key metric: transferred (MB/sec)
| Memory bandwidth | Assessment |
|---|---|
| Under 5,000 MB/s | Slow — possible memory contention |
| 5,000–15,000 MB/s | Typical KVM VPS range |
| 15,000–30,000 MB/s | Good |
| 30,000+ MB/s | Excellent — dedicated resources |
Check actual available RAM
free -h
# Verify swap configuration
swapon --show
# Check for memory balloon (VPS providers may expand/contract RAM)
cat /proc/meminfo | head -10
Part 3: Disk I/O Benchmarks
fio — the gold standard disk benchmark
sudo apt install fio -y
# Sequential read (large file transfers)
fio --name=seq-read --ioengine=libaio --iodepth=16 \
--rw=read --bs=1M --size=1G \
--numjobs=1 --runtime=30 --group_reporting
# Sequential write
fio --name=seq-write --ioengine=libaio --iodepth=16 \
--rw=write --bs=1M --size=1G \
--numjobs=1 --runtime=30 --group_reporting
# Random read (database workload)
fio --name=rand-read --ioengine=libaio --iodepth=64 \
--rw=randread --bs=4K --size=1G \
--numjobs=4 --runtime=30 --group_reporting
# Random write (database workload)
fio --name=rand-write --ioengine=libaio --iodepth=64 \
--rw=randwrite --bs=4K --size=1G \
--numjobs=4 --runtime=30 --group_reporting
Key metrics: read/write bandwidth (MB/s) and IOPS (I/O operations per second)
| Workload | Typical SSD VPS | NVMe Dedicated Server |
|---|---|---|
| Sequential read | 200–800 MB/s | 2,000–7,000 MB/s |
| Sequential write | 150–500 MB/s | 1,500–5,000 MB/s |
| Random read 4K IOPS | 5,000–50,000 | 100,000–500,000 |
| Random write 4K IOPS | 3,000–30,000 | 80,000–300,000 |
Quick disk speed test (simple method)
# Write speed test (1 GB)
dd if=/dev/zero of=/tmp/disktest bs=1M count=1024 oflag=dsync
# Read speed test
dd if=/tmp/disktest of=/dev/null bs=1M
rm /tmp/disktest
Part 4: Network Benchmarks
speedtest-cli — internet throughput
sudo apt install speedtest-cli -y
# Run speed test to nearest server
speedtest-cli
# Run to a specific server (list servers first)
speedtest-cli --list | head -20
speedtest-cli --server SERVER_ID
iperf3 — between two VPS instances
sudo apt install iperf3 -y
# On VPS 1 (server mode)
iperf3 -s
# On VPS 2 (client mode) — test throughput to VPS 1
iperf3 -c VPS1_IP -t 10 -P 4
# Reverse test (download from server)
iperf3 -c VPS1_IP -t 10 -P 4 -R
Network latency test
# Ping latency to major locations
ping -c 20 8.8.8.8 # Google (US)
ping -c 20 1.1.1.1 # Cloudflare (US)
ping -c 20 tokyo.google.com # Japan
ping -c 20 sg.google.com # Singapore
# MTR — traceroute + ping combined
sudo apt install mtr -y
mtr --report 8.8.8.8
Part 5: Database Benchmark
sysbench MySQL/MariaDB benchmark
sudo apt install mariadb-server -y
sudo mysql -e "CREATE DATABASE sbtest; CREATE USER 'sbtest'@'localhost' IDENTIFIED BY 'sbtest'; GRANT ALL ON sbtest.* TO 'sbtest'@'localhost';"
# Prepare test data
sysbench oltp_read_write \
--db-driver=mysql \
--mysql-user=sbtest \
--mysql-password=sbtest \
--mysql-db=sbtest \
--tables=10 \
--table-size=100000 \
prepare
# Run the benchmark
sysbench oltp_read_write \
--db-driver=mysql \
--mysql-user=sbtest \
--mysql-password=sbtest \
--mysql-db=sbtest \
--tables=10 \
--table-size=100000 \
--threads=4 \
--time=60 \
run
Key metric: transactions per second (TPS) — this reflects combined CPU, RAM, and disk performance for database workloads.
Part 6: Complete Benchmark Script
nano ~/run-benchmarks.sh
#!/bin/bash
REPORT="/var/log/vps-benchmark-$(date +%Y%m%d).txt"
echo "=== VPS Benchmark Report: $(date) ===" | tee $REPORT
echo "Hostname: $(hostname)" | tee -a $REPORT
echo "CPU: $(grep 'model name' /proc/cpuinfo | head -1 | cut -d: -f2)" | tee -a $REPORT
echo "RAM: $(free -h | grep Mem | awk '{print $2}')" | tee -a $REPORT
echo "OS: $(lsb_release -d | cut -d: -f2)" | tee -a $REPORT
echo "" | tee -a $REPORT
echo "=== CPU (sysbench single-thread) ===" | tee -a $REPORT
sysbench cpu --cpu-max-prime=20000 --threads=1 run 2>&1 | grep "events per second" | tee -a $REPORT
echo "=== CPU (sysbench multi-thread) ===" | tee -a $REPORT
sysbench cpu --cpu-max-prime=20000 --threads=$(nproc) run 2>&1 | grep "events per second" | tee -a $REPORT
echo "=== Memory ===" | tee -a $REPORT
sysbench memory --memory-block-size=1K --memory-total-size=5G run 2>&1 | grep "transferred" | tee -a $REPORT
echo "=== Disk (sequential write) ===" | tee -a $REPORT
dd if=/dev/zero of=/tmp/bench_test bs=1M count=512 oflag=dsync 2>&1 | tail -1 | tee -a $REPORT
echo "=== Disk (sequential read) ===" | tee -a $REPORT
dd if=/tmp/bench_test of=/dev/null bs=1M 2>&1 | tail -1 | tee -a $REPORT
rm -f /tmp/bench_test
echo "=== Network ===" | tee -a $REPORT
speedtest-cli --simple 2>&1 | tee -a $REPORT
echo "=== Benchmark Complete ===" | tee -a $REPORT
echo "Full report saved to: $REPORT"
chmod +x ~/run-benchmarks.sh
sudo bash ~/run-benchmarks.sh
Interpreting Results: VPS.DO Reference Numbers
VPS.DO KVM VPS plans use dedicated vCPUs backed by enterprise-grade hardware. Typical benchmark results for the USA VPS 500SSD plan (2 vCPU / 4 GB RAM):
| Test | Expected result |
|---|---|
| sysbench CPU (1 thread) | 800–1,400 events/sec |
| Memory bandwidth | 10,000–20,000 MB/s |
| Disk seq. write (dd) | 300–700 MB/s |
| Disk seq. read (dd) | 400–900 MB/s |
| Network download | 500–1,000 Mbps |
| Network upload | 500–1,000 Mbps |
| Ping to US servers | 1–5ms |