.github/skills/benchmarking/SKILL.md
Guide for building, running, and analyzing Nanvix performance benchmarks. Use this when asked about benchmark setup, execution, or interpretation.
npx skillsauth add nanvix/nanvix benchmarkingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the user asks about running, creating, or analyzing performance benchmarks in Nanvix.
Nanvix includes nanvix-bench (src/utils/nanvix-bench/) for measuring system performance.
Benchmarks require a release build with panic-level logging.
# Standard benchmarks.
./z build -- all RELEASE=yes LOG_LEVEL=panic
# Echo-breakdown benchmark (requires message timestamping).
./z build -- all RELEASE=yes LOG_LEVEL=panic TIMESTAMP_MSG=yes
| Benchmark | Description |
|-------------------------|---------------------------------------|
| boot-time | Start a user VM (no linuxd) |
| cold-start | Start linuxd + VM + HTTP echo |
| cold-start-l2 | cold-start with linuxd in L2 VM |
| cold-start-uvm | cold-start reusing linuxd |
| concurrent | cold-start with many VMs alive |
| concurrent-l2 | concurrent with linuxd in L2 VM |
| echo-breakdown | HTTP echo step-by-step breakdown |
| echo-breakdown-l2 | echo-breakdown with linuxd in L2 VM |
| round-trip-latency | Latency vs. echo payload size |
| warm-start | Fixed-size HTTP echo latency |
| warm-start-l2 | warm-start with linuxd in L2 VM |
| warm-start-vmm | warm-start without linuxd |
# Basic usage.
./bin/nanvix-bench.elf -benchmark cold-start
./bin/nanvix-bench.elf -benchmark warm-start
./bin/nanvix-bench.elf -benchmark echo-breakdown
# See all options.
./bin/nanvix-bench.elf -help
For best performance, pin components to different CPU dies. Create a JSON config:
{
"client_core_str": "0-9",
"linuxd_core_str": "10-14",
"nanovm_core_str": "15-19"
}
Then pass it to the benchmark:
./bin/nanvix-bench.elf \
-benchmark <benchmark> \
-hwloc <path_to_config.json>
For benchmarks with many iterations, increase system limits:
ulimit -u 65536 # Max user processes.
ulimit -n 65536 # Max open files.
Source code for benchmark programs:
| Benchmark App | Path | Lang |
|-------------------|-------------------------------------|------|
| echo-rust-nostd | src/benchmarks/echo-rust-nostd/ | Rust |
| echo-wasm-rust | src/benchmarks/echo-wasm-rust/ | WASM |
| noop-js | src/benchmarks/noop-js/ | JS |
| noop-rust-nostd | src/benchmarks/noop-rust-nostd/ | Rust |
| noop-wasm-rust | src/benchmarks/noop-wasm-rust/ | WASM |
Benchmark results can be visualized with the plotting script:
python3 scripts/plot-performance.py
Additional analysis can be done with the automation script:
python3 scripts/benchmark.py
On Windows, nanvix-bench runs in standalone mode (no HTTP, no linuxd). The standalone cold-start
benchmark spawns a fresh nanvixd process per iteration in interactive mode and measures the time
from process spawn to the first echo round-trip.
.\z.ps1 build -- all RELEASE=yes LOG_LEVEL=panic
| Benchmark | Description |
|--------------------|---------------------------------------------------------|
| boot-time | Start a user VM (no nanvixd) |
| cold-start | Spawn nanvixd + VM + echo round-trip (standalone mode) |
| snapshot-restore | Measure snapshot restore latency vs boot-time |
| 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 -help
Note: HTTP-based benchmarks (
warm-start,round-trip-latency,concurrent, L2 variants, andecho-breakdown) are Linux-only.
testing
Guide for Nanvix CI and GitHub Actions workflow behavior, including local pipeline execution and matrix coverage. Use this when asked about CI checks, workflow failures, or release flow.
development
Guide for developing, building, and running Nanvix user-space applications across supported runtimes and languages. Use this when asked about guest app implementation or execution.
development
Guide for diagnosing Nanvix build, runtime, and test failures, including cleanup and debugging workflows. Use this when asked to investigate errors or unstable behavior.
testing
Guide for running Nanvix tests with z. Use this when asked to run unit tests, integration tests, or the full test suite.