Linux VPS

Benchmark a Linux server: CPU, disk and network tests

Measure a new VPS or dedicated server with sysbench for CPU and memory, fio for disk IOPS, iperf3 for network throughput and simple HTTP load tests, and read the results sensibly.

IntermediateLinux VPS and dedicated servers3 min read

Benchmarking a new server tells you whether it delivers what you paid for and gives you a baseline to compare against later. This guide shows how to benchmark a Linux server's CPU, memory, disk and network with standard open-source tools, and how to interpret the numbers.

Before you start

  • Root SSH access to a Linux VPS or dedicated server.
  • Run benchmarks before putting production traffic on the server, or at quiet times – they use a lot of resources.
  • Do not run aggressive benchmarks constantly on shared VPS hosts; it affects neighbours and may break the provider's acceptable use policy.

Install the tools

  • Ubuntu/Debian: sudo apt install -y sysbench fio iperf3
  • AlmaLinux/Rocky: sudo dnf install -y epel-release && sudo dnf install -y sysbench fio iperf3

CPU

  1. Single-thread score (matters for PHP and game servers):
    sysbench cpu --threads=1 --time=20 run
  2. All threads:
    sysbench cpu --threads=$(nproc) --time=20 run
  3. Compare the events per second values. Ideally the multi-thread score scales close to the single score × threads; much less suggests shared or throttled CPUs.

Memory

sysbench memory --threads=1 --memory-total-size=10G run

Look at the MiB/sec transferred.

Disk

  1. Random 4K mixed read/write (most relevant for databases and websites):
    fio --name=rand --filename=/root/fio.test --size=2G --rw=randrw --rwmixread=75 --bs=4k --iodepth=64 --ioengine=libaio --direct=1 --runtime=30 --time_based --group_reporting
  2. Sequential throughput (backups, large files):
    fio --name=seq --filename=/root/fio.test --size=2G --rw=read --bs=1M --iodepth=16 --ioengine=libaio --direct=1 --runtime=20 --time_based
  3. Clean up: rm /root/fio.test.

--direct=1 bypasses the page cache so you test the disk, not RAM.

Network

  1. On a second server, start a listener: iperf3 -s.
  2. From the server under test:
    iperf3 -c other-server-ip -P 4 -t 20

    Add -R to test the other direction.

  3. Test latency and route quality with mtr to locations your visitors are in.

Results depend on both ends and the path between them, so test to servers near you and near your users.

Web server load test

From a different machine, measure how your actual site responds under concurrent load using a tool such as ab, wrk or k6:

ab -n 1000 -c 50 https://example.com/

Watch requests per second, latency and failed requests, and only test sites you own.

Reading the results

TestWhat good looks likeRed flags
CPUConsistent scores across runsBig variation, high steal time in top
Disk random 4KHigh IOPS, low latency on NVMeIOPS far below SSD class, long latency spikes
NetworkNear the advertised port speed to nearby hostsLow throughput with packet loss

Run each test three times at different times of day and use the median.

FAQ: server benchmarks

Why do my results differ from the provider's numbers?

Benchmarks depend on tool settings, test file size, caching and the remote endpoint. Compare like with like.

Are all-in-one benchmark scripts safe?

Read any script before running it as root. The individual tools above do the same tests transparently.

Do benchmarks predict website speed?

Partly. Real-world speed also depends on caching, PHP and database configuration and latency to visitors.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.