How to Benchmark Your Linux Server (Disk, CPU, Memory and Network — and What the Numbers Mean)

Is it fast enough? fio, sysbench and iperf3 give the disk, CPU and network real numbers — and a table to compare them to.

"The server feels slow" and "would a mini PC be faster?" are both answered with numbers, and the tools are free: fio for disks, sysbench for CPU and memory, iperf3 for the network (127). Run them once on a fresh machine and you have a baseline; run them again when things feel off and you know whether it's the hardware or the software. The typical results below are for comparison.

Quick reference

WhatCommandGood home-server number
Disk, sequential readfio --name=r --rw=read --bs=1M --size=2G --direct=1SATA SSD 500 MB/s · NVMe 2000+ · HDD 150–250
Disk, random 4Kfio --name=rr --rw=randread --bs=4k --size=1G --direct=1 --iodepth=32SSD 50k+ IOPS · HDD 100–300 · SD card 1–3k
CPUsysbench cpu --threads=$(nproc) runevents/s: Pi 4 ≈ 2,500 · N100 ≈ 7,000 · i5-8400 ≈ 10,000
Memorysysbench memory runGB/s: Pi 4 ≈ 3 · N100 ≈ 10 · desktop DDR4 ≈ 15+
Networkiperf3 -c servergigabit ≈ 940 Mbps · 2.5G ≈ 2,350
Everything, one score`curl -sL yabs.shbash`compare to other people's posted results

1. Disk with fio

sudo apt install fio -y
cd /mnt/data # test the drive you care about

Sequential (big files: media, backups):

fio --name=seqread --rw=read --bs=1M --size=2G --numjobs=1 --direct=1 --group_reporting
fio --name=seqwrite --rw=write --bs=1M --size=2G --numjobs=1 --direct=1 --group_reporting

Random 4K (databases, Immich, Docker layers — what "feels slow" usually is):

fio --name=randread --rw=randread --bs=4k --size=1G --numjobs=4 --iodepth=32 --direct=1 --group_reporting
fio --name=randwrite --rw=randwrite --bs=4k --size=1G --numjobs=4 --iodepth=32 --direct=1 --group_reporting

Read bw= (throughput) and IOPS=. Delete the test files after (rm seqread* randread*). On ZFS, --direct=1 may be refused; drop it and note the result includes cache.

What it tells you: a system disk under 10k random IOPS (an SD card, a USB stick, a 2.5" HDD) is why containers start slowly and Nextcloud lags; moving Docker and databases to an SSD is the single biggest upgrade (tutorial 38 for the Pi).

2. CPU and memory with sysbench

sudo apt install sysbench -y
sysbench cpu --cpu-max-prime=20000 --threads=$(nproc) run
sysbench cpu --cpu-max-prime=20000 --threads=1 run
sysbench memory --memory-block-size=1M --memory-total-size=10G run

Read events per second (CPU) and MiB/sec (memory). The single-thread number predicts how snappy web apps feel; the all-threads number predicts transcoding and photo indexing.

Rough reference, events/s all threads: Raspberry Pi 4 ≈ 2,500; Pi 5 ≈ 6,000; Intel N100 mini PC ≈ 7,000; an eight-year-old i5 desktop ≈ 10,000; a modern i5/Ryzen 5 ≈ 25,000+. Memory: Pi 4 ≈ 3 GB/s; N100 ≈ 10; DDR4 desktop ≈ 15–20.

3. Network with iperf3

Tutorial 127 covers it: iperf3 -s on the server, iperf3 -c 192.168.1.50 -t 20 from a wired client. Gigabit should show ≈ 940 Mbps; if you see 94, something's negotiating at 100 Mb/s (117). Test Wi-Fi from the rooms that matter, and -R for the other direction.

4. The whole thing at once

YABS (Yet Another Benchmark Script) runs fio, Geekbench and an internet speed test and prints a shareable table:

curl -sL yabs.sh | bash -s -- -i # -i skips the internet test

Save the output in BookStack (88) as the machine's baseline; the Geekbench score compares directly with any CPU on browser.geekbench.com.

5. Real-world checks

Synthetic numbers are a start; these are what you actually notice:

6. When the numbers say "upgrade"

Troubleshooting

fio numbers wildly high. Cache: missing --direct=1, or a size smaller than RAM on a filesystem that caches. Use a bigger --size or direct I/O.

sysbench not found on a Pi. Older repos; pipx install sysbench or build from source, or use openssl speed as a rough CPU check.

Results vary run to run. Other things were running; stop Docker stacks for a clean baseline, and run three times.

Benchmark heated the box and it throttled. That's a finding (117, 119): check sensors during the run.

Wrapping up

fio for the disk, sysbench for CPU and memory, iperf3 for the wire, YABS for a shareable table. Numbers in the wiki when the machine is new, numbers again when it feels wrong, and the table above to say whether the hardware is the problem — or, usually, that an SSD is.

Call us