Skip to main content
← All guides

Measuring server performance (CPU, disk)

When comparing plans, or a VPS with a dedicated server, it's easier to decide if you measure them yourself in the same way. This guide is based on Linux (Ubuntu/Debian).

Measuring pushes the CPU and disk to the max. If the server is already running a service, do it at a time when there are few users.

CPU: one core and all cores

sudo apt install -y sysbench
sysbench cpu --threads=1 --time=10 run
sysbench cpu --threads=$(nproc) --time=10 run

The higher the events per second in the results, the faster.

  • --threads=1 — Single-core performance. For programs where one core matters, like a Minecraft server, compare this number.
  • --threads=$(nproc) — Performance with all cores working together. If you run several programs or split work up, compare this number.

To see which kind your program is, see Single-core or multi-core?.

sysbench is a test that repeats simple calculations, so it doesn't exactly match how real programs perform. Use it to compare servers using the same command.

Disk

Quick: write speed

dd if=/dev/zero of=dd-test.tmp bs=1M count=1024 oflag=direct status=progress
rm dd-test.tmp

The speed at the end of the last line (MB/s or GB/s) is how fast it writes a large file continuously.

Detailed: small reads and writes

For work that frequently reads and writes small pieces of data, like databases or saving game worlds, the test below gives a better picture.

sudo apt install -y fio
fio --name=test --filename=fio-test.tmp --size=1G --rw=randrw --rwmixread=70 --bs=4k --ioengine=libaio --iodepth=32 --direct=1 --runtime=30 --time_based --group_reporting
rm fio-test.tmp
  • read: IOPS=…, write: IOPS=… — The number of reads and writes handled per second. Higher is better.
  • BW= — Throughput per second.

Both tests create a test file (1GB), so you need free disk space, and be sure to delete it with rm when you're done.

Be careful with network speed tests

Speed test tools send and receive large amounts of data, so they use traffic.

  • On the General network, if you exceed the daily traffic allowance, your speed is limited for the rest of that day.
  • The Security network uses the traffic amount you set when ordering, so if you use it up on tests, you may need to buy more.

If your goal is to find out why a game or connection is slow, measuring the response time (ping) from your PC to the server is often enough.

ping server-ip

Run it in Command Prompt on Windows, or in a terminal on Mac/Linux. (On Mac/Linux, stop it with Ctrl + C.) Windows servers may not respond to ping because of the default firewall settings.

When comparing results

  • Measure two or three times with the same command and check that the values are similar. A VPS shares a physical server, so results may differ a little each time you measure.
  • The comparison only means something if the servers use the same operating system and the same commands.
  • What matters more than the numbers is whether your actual program runs well. For how to check usage, see Checking a slow server.

If your problem isn't solved, open a ticket on our Discord.