Why Benchmark?
Benchmarking establishes baseline performance metrics for your server. This helps you identify bottlenecks, compare hosting providers, and measure the impact of optimizations.
CPU Benchmark with sysbench
sudo apt install -y sysbench
# Single-thread CPU test
sysbench cpu --cpu-max-prime=20000 run
# Multi-threaded (4 threads)
sysbench cpu --cpu-max-prime=20000 --threads=4 runLower execution time = better CPU performance.
Memory Benchmark
# Sequential read
sysbench memory --memory-block-size=1M --memory-total-size=10G run
# Random access
sysbench memory --memory-block-size=1K --memory-total-size=10G --memory-access-mode=rnd runDisk I/O with fio
sudo apt install -y fio
# Random read (simulates database workload)
fio --name=randread --ioengine=libaio --iodepth=32 --rw=randread \
--bs=4k --size=1G --numjobs=4 --runtime=30 --group_reporting
# Random write
fio --name=randwrite --ioengine=libaio --iodepth=32 --rw=randwrite \
--bs=4k --size=1G --numjobs=4 --runtime=30 --group_reporting
# Sequential read (simulates file serving)
fio --name=seqread --ioengine=libaio --rw=read \
--bs=1M --size=2G --numjobs=1 --runtime=30Network Benchmark
sudo apt install -y iperf3
# On the remote server (start server mode)
iperf3 -s
# From your VPS (client mode)
iperf3 -c remote-server-ip -t 30Interpreting Results
- CPU: events per second > 1000 is good for most workloads
- Disk IOPS: NVMe > 50,000, SSD > 10,000, HDD ~200
- Network: should match your port speed (1 Gbps = ~940 Mbps actual)