Nanvix ships with nanvix-bench for measuring baseline system performance.
For stable results, pin the benchmark client to an isolated CPU set:
{
"client_core_str": "0-9"
}You will need to save this JSON file.
nanvix-bench currently supports the following benchmarks:
boot-time: measure the time to start a user VM (excludingnanvixd).cold-start: spawnnanvixdand a user VM, then complete the first echo round trip.cold-start-uvm: start a user VM and complete its first standalone gateway echo.snapshot-restore: compare snapshot restore latency with cold boot.vfs-bench: measure VFS operation latencies (stat, open/close, read, write, readdir, create/unlink, mkdir/rmdir, rename) inside the guest VM using a FAT32 image loaded into guest memory via the RAMFS region.warm-start-gateway: measure steady-state round-trip latency through the standalone gateway.warm-start-socket: measure TCP echo latency through guest networking.warm-start-vmm: measure raw round-trip latency inside the user VM.
you may see all the optional flags with:
./bin/nanvix-bench.elf -helpmost importantly, if you are pinning cores, make sure to also pass the path to your JSON config file:
./bin/nanvix-bench.elf -benchmark <benchmark> -hwloc <path_to_file.json>ℹ️ Note: All benchmarks require compiling Nanvix with
RELEASE=yesandLOG_LEVEL=panic. ℹ️ Note: If you are running the benchmarks with a high number of iterations, consider setting high system limits in the process spawningnanvix-bench.elf(i.e.ulimit -uandulimit -n).
For detailed profiling infrastructure on Windows -- including system tuning, WPR/ETW tracing, flamegraph generation, and A/B regression detection -- see the Profiling Guide (Windows).
On Windows, the cold-start benchmark spawns a fresh nanvixd process per iteration and measures
the time from process spawn to the first echo response.
Windows Defender may quarantine unsigned executables in bin/. To prevent this,
run the following in an elevated (Administrator) PowerShell:
Add-MpPreference -ExclusionPath "C:\path\to\nanvix\bin"This exclusion is recursive and covers all files and subdirectories under bin/.
.\z.ps1 build -- all RELEASE=yes LOG_LEVEL=panicThis builds all components including nanvix-bench.exe with the WHP backend.
| Benchmark | Description |
|---|---|
boot-time |
Start a user VM (no nanvixd) |
cold-start |
Spawn nanvixd + VM + echo round-trip |
cold-start-uvm |
Start a user VM + first gateway echo |
vfs-bench |
VFS operation latencies (FAT32 image via RAMFS region) |
warm-start-gateway |
Round-trip latency through the standalone gateway |
warm-start-socket |
TCP echo latency through guest networking |
warm-start-vmm |
Raw round-trip latency inside the user VM |
# Using z.ps1.
.\z.ps1 bench -- -benchmark cold-start -iterations 10
# Or directly.
.\bin\nanvix-bench.exe -benchmark cold-start -iterations 10
.\bin\nanvix-bench.exe -benchmark boot-time -iterations 100
.\bin\nanvix-bench.exe -helpUse -help to list all benchmark options supported by the current build.