Performance
Measure agentOS VM startup latency, memory use, and execution throughput.
Measure the exact workload and hardware used in production. VM startup includes Core configuration, filesystem bootstrap, software projection, and the first execution.
Cold-start phases
Record these phases separately:
- sidecar process startup, or reuse of a shared sidecar;
- software acquisition;
- Core and filesystem boot;
- first guest instruction.
Software passed at boot must be available before the VM is ready. The sidecar’s content-addressed package cache should make a digest hit visible as a separate metric from a network download.
Memory per VM
Use staircase measurement to isolate marginal VM cost:
- create and destroy one warmup VM;
- force garbage collection and record the process-tree RSS baseline;
- add VMs one at a time and sample RSS after each settles;
- average the step deltas;
- dispose every VM and record reclaimed RSS.
Process-tree RSS matters because execution workers may not be represented by
the embedding Node.js process’s process.memoryUsage() value.
Repository benchmarks
From the repository root:
./scripts/benchmarks/run-benchmarks.sh
The benchmark script builds an optimized native binary, points the Core client
at it with AGENTOS_SIDECAR_BIN, and writes JSON results under
scripts/benchmarks/results/.
For a focused run, build first and select the minimal sleep/command workload:
pnpm build
cargo build --release -p agentos-native-sidecar
export AGENTOS_SIDECAR_BIN="$PWD/target/release/agentos-native-sidecar"
pnpm exec tsx scripts/benchmarks/coldstart.bench.ts \
--workload=sleep --iterations=2000
pnpm exec tsx --expose-gc scripts/benchmarks/memory.bench.ts \
--workload=sleep --count=20
Use a release build and an otherwise idle machine. Percentiles require enough samples: roughly 30 for p50, 200 for p95, and 1,000 for p99. Keep the raw JSON with any published comparison so changes in hardware, package cache state, and workload remain auditable.