How it works

What nodebench runs, with which settings, and how to change them.

System info

CPU model, cores and clock, the AES-NI and VM-x flags, the virtualization type (from systemd-detect-virt with a few fallbacks for LXC, OpenVZ and plain VMs), RAM, swap, disk size, distro, kernel and uptime. IPv4 and IPv6 are checked with a request to Cloudflare, and the provider name, ASN and country come from ipinfo.io. On macOS the same comes from sysctl and sw_vers, on Windows from WMI.

Linux, macOS and Windows

On Linux and macOS it's the same bash script. macOS ships an old bash and BSD tools, nodebench gets along with both. On Windows there is a PowerShell version with the same options and the same result format, it runs in Windows PowerShell 5.1 and PowerShell 7 without admin rights:

irm https://bench.instantnode.eu | iex

Where the tools differ, it's said below. Results from all three end up on the same pages and the same leaderboard.

CPU

openssl speed with sha256 and aes-256-gcm on 16 KiB blocks, once on a single thread and once with -multi on all cores, 5 seconds each. It's not Geekbench, and that's on purpose: openssl is on nearly every server, the run is short and the numbers are easy to compare. sha256 is plain integer work, aes-256-gcm shows how good the crypto extensions are.

macOS comes with LibreSSL instead of OpenSSL, which can't be told the block size or the run time. It runs its standard sizes for 3 seconds each and nodebench takes the largest, 8 KiB, so the cpu test takes about a minute there. Windows has no openssl at all: the same two algorithms run through the crypto library built into Windows (CNG) on 16 KiB blocks. Both use the CPU's crypto instructions the way openssl does, so the numbers are close, not identical.

The ratio between one and all threads tells you how well the cores scale. During the run on all threads nodebench also reads the steal time from /proc/stat (Linux only): the share of CPU time the hypervisor handed to other guests while this one wanted it. On a dedicated server or a well kept VPS it stays close to 0%. A few percent is normal on shared hosts. More than that means you're not getting the cores you see.

Disk

fio random read/write, 50/50 mix, with 4k, 64k, 512k and 1m blocks, iodepth 64, two jobs, O_DIRECT, 20 seconds per block size, on a 2 GB file in the current directory. These are the parameters yabs uses. 4k is about IOPS, the small random access a database does. 1m is close to raw throughput. If fio can't run at all, a sequential dd test is used and the result says so.

On Windows it's Microsoft's diskspd with the same settings: two threads, 64 I/Os in flight each, 50/50 random read/write, unbuffered. On macOS fio is used when it's installed (brew install fio), otherwise dd, and dd only measures the write there, because a read on macOS can't get past the page cache.

The result also notes the filesystem and what kind of device the file sits on: NVMe, SSD, spinning disk or a virtual disk. Virtual disks always report themselves as spinning, so nodebench doesn't guess what's behind them.

Network

iperf3 in both directions with 8 parallel streams for 10 seconds, plus ping and packet loss, against 12 public servers (list), or all 17 with -x. Over IPv4, and IPv6 as well when the server has it. A busy server gets up to three tries on random ports from its range. A direction that still fails is shown as failed, not as zero. If iperf3 can't connect anywhere, plain HTTP downloads are measured instead.

On Windows a Windows build of iperf3 is downloaded for the run. On macOS an installed iperf3 is used (brew install iperf3), without it nodebench measures the HTTP downloads.

Options

Pass them after bash -s --:

curl -sL bench.instantnode.eu | bash -s -- -n --no-share

In PowerShell, iex can't take options, so the script is turned into a script block first:

& ([scriptblock]::Create((irm https://bench.instantnode.eu))) -n --no-share
-c
skip the cpu test
-s
skip the disk test
-n
skip the network test
-4, -6
network tests over IPv4 or IPv6 only
-l REGIONS
only test these regions, comma separated: eu, na, sa, asia, oc
-x
test against all 17 locations instead of the standard 12
-q
quick run: 2 second cpu, 5 second disk and 4 second network tests on a 512M file. Good for a first look, not ranked on the leaderboard
-d DIR
directory for the disk test file (default: current directory)
-S SIZE
size of the disk test file, e.g. 512M (default: 2G)
-t N
threads for the multi-core cpu test (default: all cores)
-L [NAME]
put the result on the leaderboard, optionally under a name
--no-share
don't upload the result
--json
print the result as json, the share link goes to stderr

Environment: NODEBENCH_FIO_TIME, NODEBENCH_IPERF_TIME and NODEBENCH_CPU_TIME set the test lengths in seconds, NODEBENCH_URL points the upload at your own server, NO_COLOR turns colors off.

Leaderboard

Results only show up on the leaderboard with -L. Without a name the provider name is used, or pass one: -L "fra-edge-01". Names are up to 32 characters, no links. Only the best run per name, CPU model and network is listed, quick runs aren't ranked, and results with numbers no real hardware produces stay shareable but don't rank either.

Questions

The network test takes too long

Press Ctrl+C while it runs. The locations that are done stay in the result, the rest is skipped, and the summary and the share link come as usual. Ctrl+C during the cpu or disk test still stops everything, and on Windows Ctrl+C always ends the whole run. -l eu or -q make it shorter from the start.

Can I keep it on the server?

Yes, curl -fsSL https://raw.githubusercontent.com/instantnodeeu/nodebench/main/install.sh | sh installs it as a nodebench command, in /usr/local/bin as root and in ~/.local/bin otherwise. Same options as the one-liner, run the line again to update.

What does it leave behind?

Nothing. The fio and iperf3 builds go into a temp directory that is removed on exit, also on Ctrl+C. The disk test file is deleted as well.

Can I trust the downloaded binaries?

They are the static builds published by the yabs project, pinned to one release. When sha256sum is available, each binary is checked against the checksum file of that release and not run if it doesn't match. fio and iperf3 from your system are used first if they're installed. On Windows, diskspd comes from Microsoft's own release and iperf3 from the ar51an/iperf3-win-builds release, both pinned in the script and checked against their sha256 before anything runs.

How much traffic does it use?

Mostly the iperf3 tests: on a gigabit port up to about 1.2 GB per location and direction, so around 30 GB for a standard run over IPv4 and twice that with IPv6. -l eu keeps it to Europe, -q cuts each network test to 4 seconds.

Why are my disk numbers so far from dd?

dd writes one big sequential file, often through the page cache. fio with O_DIRECT and random access at queue depth 64 shows what the storage does under load, which is usually a lot less.

Can I get a result deleted?

Yes, see privacy.