Benchmarks answer practical questions. Is this new VPS as fast as the old one? Which location gives my users the lowest latency? Did that config change actually help? The trick is to measure the resource that matters for your workload, with tools that give repeatable numbers. Here’s a toolbox for each part of a server.

Before you benchmark

  • Run each test several times and at different times of day. Single runs mislead.
  • Compare like with like: the same tool versions, parameters, OS and file sizes.
  • Avoid hammering shared infrastructure for hours. Short, targeted runs give the same insight.
  • Benchmark your real workload when you can. A synthetic score is a proxy, and your app’s response time is the truth.

Know what you’re testing:

nproc; lscpu | grep 'Model name'
free -h
lsblk -d -o NAME,SIZE,ROTA

See CPU info.

CPU

sysbench gives a quick, comparable CPU score:

sudo apt install sysbench
sysbench cpu --threads=1 run      # single-core
sysbench cpu --threads=$(nproc) run   # all cores

Compare events per second. Single-thread performance matters most for PHP, WordPress, Node.js and game servers. Multi-thread performance matters for compilation, encoding and parallel workers.

Geekbench produces scores you can compare against public results for many CPUs. See Geekbench and sysbench.

Memory

sysbench memory --threads=1 run

This measures memory bandwidth. It rarely differs much between providers, but it helps spot unusual setups.

Disk

fio is the standard for storage. It measures random IOPS (what databases care about) and sequential throughput:

fio --name=randrw --filename=/root/fio.test --size=1G --rw=randrw --rwmixread=70 \
    --bs=4k --iodepth=32 --ioengine=libaio --direct=1 --runtime=30 --time_based --group_reporting
rm /root/fio.test

See fio disk benchmark for a full set of tests and how to read them.

Skip dd if=/dev/zero of=test bs=1M count=1000. It measures mostly caching and compression, not real disk performance.

Network

Bandwidth between your servers, with iperf3:

iperf3 -s                       # on server A
iperf3 -c A-ip -t 20            # on server B
iperf3 -c A-ip -t 20 -R         # reverse direction
iperf3 -c A-ip -P 4             # 4 parallel streams

See iperf3.

Internet speed to public test servers:

speedtest       # Ookla CLI

See speedtest CLI.

Latency and routing to your users matter more than raw bandwidth for websites and games:

mtr -rwc 50 your-user-region-ip

See ping, traceroute and mtr. VPS.DO publishes test IPs for every data centre so you can measure latency from your own location before ordering. They’re in the network test section of the USA, Hong Kong and Japan VPS pages.

All-in-one scripts

Community scripts such as YABS (“Yet Another Bench Script”) run fio, iperf3 and Geekbench in one go and print a summary:

curl -sL yabs.sh | bash

They’re convenient, but read any script before piping it to bash, and know that they download tools and run network tests to public servers.

Web server and application

What users feel is requests per second and latency under load:

# wrk: high-performance HTTP benchmark
wrk -t4 -c100 -d30s https://example.com/

# ApacheBench (simple)
ab -n 2000 -c 50 https://example.com/

# k6: scripted, realistic scenarios
k6 run script.js

Rules:

  • Run the load generator from another machine, ideally near your users, not on the server itself.
  • Test only your own sites.
  • Watch the server while testing (htop, vmstat 1, the database’s slow log) to find the bottleneck. See vmstat.
  • Compare cached vs uncached pages. Page caching usually changes the numbers by 10–100×. See website speed optimization.

Databases

sysbench oltp_read_write --mysql-user=bench --mysql-password=… --tables=10 --table-size=100000 prepare
sysbench oltp_read_write --mysql-user=bench --mysql-password=… --tables=10 --table-size=100000 --threads=8 --time=60 run
sysbench oltp_read_write … cleanup

For PostgreSQL there’s the built-in pgbench. Use a dedicated test database, never production.

Interpreting results

If this is low… It affects…
Single-core CPU PHP/WordPress response time, Node, game servers
Random 4k IOPS / latency Databases, many small files, package installs
Sequential throughput Backups, large file serving, video
Network latency Interactive sites, APIs, games, SSH feel
Bandwidth Downloads, streaming, backups to remote storage

Quick reference

Resource Tool
CPU sysbench cpu, Geekbench
Disk fio
Network between servers iperf3
Internet speed speedtest
Latency / route mtr
Web wrk, ab, k6
MySQL / PostgreSQL sysbench oltp_*, pgbench

Related: load average and choosing a VPS location.

  • Performance
  • VPS Guides
  • Linux