Guideschevron_rightServers

Servers · 8 min read · Updated

How to Benchmark a VPS or Dedicated Server

To benchmark a VPS or dedicated server fairly, test each part separately with standard tools: CPU with sysbench (one thread and all threads), disk with fio (random 4K reads and writes, and large sequential transfers, always on a test file), memory with sysbench memory, and the network with iperf3 to a server you control. Run each test several times, at different times of day, and compare like with like: the same tool, settings and operating system on each server.

Before You Start

  • Use a fresh server with nothing else running, and the same operating system on each server you compare.
  • Install the tools: sudo apt install -y sysbench fio iperf3 on Ubuntu or Debian.
  • Note what you are testing: lscpu shows the processor model and thread count, and nproc how many threads the server has.

Our VPS plans run on AMD Ryzen 9 9950X in Ashburn and AMD EPYC 9455P in Dallas; inside a virtual machine, lscpu may show that model or a generic virtual CPU name. Dedicated servers' processors are listed on each dedicated server page.

1. CPU

sysbench cpu --threads=1 --time=30 run          # one thread
sysbench cpu --threads=$(nproc) --time=30 run   # every thread

Compare events per second. The single-thread figure predicts game servers, PHP and most web requests; the all-threads figure predicts builds, encoding and many users at once. Divide the second by the first: close to the thread count means the cores scale well under load.

2. Disk

Work in a test folder on the disk you care about, then delete it:

mkdir -p ~/fio && cd ~/fio

# random 4K reads: databases, many small files
fio --name=randread --rw=randread --bs=4k --size=4G --iodepth=64 --numjobs=4 \
    --ioengine=libaio --direct=1 --runtime=60 --time_based --group_reporting

# random 4K writes
fio --name=randwrite --rw=randwrite --bs=4k --size=4G --iodepth=64 --numjobs=4 \
    --ioengine=libaio --direct=1 --runtime=60 --time_based --group_reporting

# large sequential reads: backups, media, copying files
fio --name=seqread --rw=read --bs=1M --size=4G --iodepth=16 --numjobs=1 \
    --ioengine=libaio --direct=1 --runtime=60 --time_based --group_reporting

cd ~ && rm -rf ~/fio

Read IOPS for the 4K tests and bandwidth (MB/s) for the sequential one, and look at the latency percentiles: a disk with high IOPS but a slow 99th percentile will still feel uneven. --direct=1 bypasses the memory cache so you measure the disk, not RAM.

3. Memory

sysbench memory --memory-block-size=1M --memory-total-size=20G run

The transfer rate in MiB/sec shows memory bandwidth. It matters most for in-memory databases, caches and large data processing, and differs between DDR4 and DDR5 servers.

4. Network

Public speed-test servers measure the route to them as much as your server. For a fair number, run iperf3 between two servers you control, such as your new server and one you already have:

# on the other server
iperf3 -s

# on the server you are testing
iperf3 -c 198.51.100.21 -P 4 -t 30        # upload from the tested server
iperf3 -c 198.51.100.21 -P 4 -t 30 -R     # download to it

Open TCP 5201 on the listening server while you test, and close it afterwards. Results are capped by the slower of the two servers' port speeds and by the route between them; for latency from your users, see choosing a location by latency. Large transfers count toward your plan's monthly transfer, as explained in what 1 TB of bandwidth means.

Reading the Results Fairly

Which benchmark matches which workload
WorkloadLook atWhy
Game server, WordPress, PHPCPU single-threadOne main thread does most of the work
Builds, encoding, many usersCPU all threadsWork spreads across every core
DatabasesRandom 4K IOPS and latency, memoryMany small reads and writes; the working set should fit in memory
Backups, media, file serversSequential MB/s, networkLarge files moved in one stream

A VPS shares its host with other servers, so expect some variation; a dedicated server gives much steadier results because nothing else runs on it. If a VPS consistently falls short for your workload, the guide to choosing a dedicated server helps size the next step.

Common Questions

  • Why do my VPS results change from run to run?

    A VPS's vCPUs are threads of a host processor shared with other servers, and its disk sits on shared NVMe drives, so results move with what else the host is doing. Run each test several times at different hours and compare the middle result, not the best one.

  • Is a one-line benchmark script safe to run?

    Scripts such as YABS are popular and convenient, but piping a script from the internet into a shell runs whatever it contains as your user. Read it first, run it on a fresh server rather than one with data you care about, and never run it as root unless it needs to be.

  • Which number matters most?

    The one that matches your workload. A game server or a busy PHP site cares about single-thread speed; a build server or a database with many users cares about all cores and random disk reads; a file server cares about sequential throughput and the network.

  • Can benchmarking harm the server?

    Not if you test with files. Never point fio at a disk device such as /dev/nvme0n1 on a server with data: writing to the device directly destroys the filesystem on it. Delete the test files afterwards.

Plans and prices

VPS Plans

KVM servers on NVMe, built in minutes: order one, run these tests, and keep it if it suits you.

See all plans
  • Bronze

    3 vCPU · 6 GB RAM · 75 GB NVMe

    2 TB transfer

    $37.50/mo

    Configure inAshburnDallas
  • Silver

    4 vCPU · 8 GB RAM · 100 GB NVMe

    4 TB transfer

    $46.50/mo

    Configure inAshburnDallas
  • Gold

    6 vCPU · 12 GB RAM · 150 GB NVMe

    6 TB transfer

    $60.00/mo

    Configure inAshburnDallas
  • Diamond

    8 vCPU · 16 GB RAM · 200 GB NVMe

    8 TB transfer

    $73.50/mo

    Configure inAshburnDallas

Network port: 10 Gbps in Ashburn, VA, 50 Gbps in Dallas, TX. Pick the location when you configure.

Keep Reading

All guides