Benchmarking

Benchmarking

Measure a Nova cluster's throughput and latency with nova bench and novabench.

Two tools measure a running cluster through the public SDK. nova bench is a quick end-to-end check from the CLI: it writes at a target rate, reads live beside the writes, reads everything back, and verifies every record. novabench is the load generator: it finds a cluster's ceiling, measures latency at a fixed load, and drives reads and subscriptions. Start with nova bench; reach for novabench to size or compare.

Check a cluster with nova bench

The last argument is the bucket to run in, and it must exist. Create one first if it does not:

nova bucket create bench
nova bench --target-mibps 8 --duration 20s --catchup-delay 5s bench
Write: 7.97 MiB/s, 1020 records/s (167788544 bytes, 20482 records in 20.08s)
Read: 7.97 MiB/s, 1020 records/s (167788544 bytes, 20482 records in 20.08s)

Ack Latency Statistics (n=20482)                End-to-End Latency Statistics (n=20482)
min    :    1.96ms                              min    :    2.41ms
p50    :  114.94ms                              p50    :  116.48ms
p90    :  196.35ms                              p90    :  198.01ms
p99    :  231.17ms                              p99    :  232.45ms
max    :  266.26ms                              max    :  269.56ms
Catchup: 108.11 MiB/s, 13839 records/s (167788544 bytes, 20482 records in 1.48s)

This run used one in-memory node, so the acknowledgement latency is mostly the Standard flush wait of up to 200 ms.

nova bench creates a temporary stream bench/<uuid> in the bucket, writes records while a subscription reads them, waits, then reads the stream from its first record. Each record carries two 8-byte headers, hash and sent-us, counted in its size. A record that comes back missing, duplicated, out of order, or altered fails the run with exit code 1. The stream is deleted on exit; if the process is killed, its records expire after an hour.

--target-mibps sets the write rate, --record-size the record size, --duration the write's length, and --class the stream class. Benchmark command has every flag.

Measure with novabench

novabench runs one measured verb per process. Run several processes together for a mixed workload.

novabench append --addr 127.0.0.1:7780 --streams 4 --size 64KiB --duration 15s --warmup 3s
append  records=15525 bytes=1017446400 MiB/s=64.7 ops/s=1035 p50=88.89ms p99=578.05ms errs=0

window  start                     ops/s  MiB/s  errors  p50 ms  p99 ms  p999 ms  pooled p99 ms
0s      2026-11-22T19:23:02.986Z  790    49.4   0       127     931     940      931
10s     2026-11-22T19:23:12.986Z  762    47.6   0       50.9    334     403      334

p99 stability: median 632 ms, worst 931 ms at 0s (2026-11-22T19:23:02.986Z), spread 1.47× (σ 299 ms); tail events (over 2× the median): 0
VerbWhat it measures
appendCreates fresh streams and appends; deletes them on exit unless --keep
readRanged reads of existing streams, such as those kept with append --keep
subscribeTails existing streams and reports per-record lag
queueOpen-loop producers and one consumer group per queue, end to end
kvThe metadata store's write ceiling for one shard
delete, verify, mergeTear down a list of streams; check streams read back dense; combine several machines' results

How a run works

  1. The run connects and creates or checks its streams. A setup failure exits with code 3 and measures nothing.
  2. It sends load without recording it, to warm up (--warmup, 10 s).
  3. It records counts, bytes, and latency in fixed-memory histograms (--duration, 1 minute), with one row per --interval window.
  4. It waits for pending calls, prints the result, and deletes the run's streams. Calls still unanswered count as errors.

Choose a load model

ModelFlagsUse whenLatency includes
Closed loop--rate 0 (default)Finding the ceilingQueueing from --window calls in flight per producer
Open loop--rate N per streamp99 at a fixed loadThe delay from each call's scheduled time, so a stall shows as the queue it causes

--spread gives each stream a random phase within its interval, so arrivals are even instead of synchronized. --start-at holds every process at a shared instant after setup, which aligns runs across machines.

Append flags

--addr
Seed addresses, comma-separated; any node redirects to a stream's leader.
--streamsDefault1
Parallel streams, one producer each.
--windowDefault32
Calls in flight per producer; the SDK packs them into batches.
--sizeDefault256KiB
Payload bytes per record.
--batchDefault1
Records per append call, at most 1,000.
--header-count, --header-bytesDefault0, 16
Headers per record and value bytes per header.
--max-batch-bytes, --max-batch-recordsDefault1MiB, 1000
The cluster's batch bound; novabench refuses, with exit 2, a batch that would not fit.
--inflight-budgetDefault512MiB
Bytes staged across producers; a stalled server paces the run here, and the wait lands in backpressure_s.
--classDefaultstandard
standard or express.
--oneshot
Send each call as a one-shot append instead of through a producer.
--retry-budgetDefault0s, the SDK's 30 s
Failures inside the budget are retried and never counted; lower it for fault tests.
--json
Emit one JSON object on standard output instead of the summary.
--tokenNOVABENCH_TOKEN
Bearer token for a cluster with authentication.

read adds --readers (1), --pattern (seq or random), --from (0), and --limit (1,000 records a call). subscribe adds --subscribers (1) and --from (0, the whole backlog); its lag is the time from a record's timestamp to receipt.

Read the result

With --json, one object goes to standard output and progress to standard error. Keep the objects to compare runs against your own baseline; novabench sets no pass or fail threshold.

{
  "verb": "append",
  "throughput_mibps": 16.020833333333332,
  "ops_per_s": 256.3333333333333,
  "latency_ms": { "p50": 254.591, "p90": 360.959, "p99": 532.991, "p999": 611.327, "max": 698.879 },
  "errors": { "append": 0 }
}
  • ops_per_s counts calls: each append holds --batch records, and each read returns up to --limit.
  • A closed loop's p99 includes its own queueing. Use --rate for latency at a set load.
  • The stability line compares each window's p99. A wide spread or tail events mean the latency is not steady.
  • Three nodes on one laptop share network, disk, and metadata store. That compares settings; it does not predict production.
  • Wire traffic is about 2 to 3 times client bytes, because appends, reads, and Express copies all cross the network. Size machines and --net-capacity by wire traffic.
ExitMeaning
0A clean run
1The run finished with errors; the result is still printed
2A usage error
3Setup failed: the cluster is unreachable, or a stream is missing or empty

Where to run it

On your machine

An in-memory node exercises the whole append path with nothing else running:

go run ./cmd/novad &
go run ./cmd/novabench append --addr localhost:7780 --size 4KiB --duration 10s --warmup 2s

On Docker Compose

A client on the host follows redirects to host.docker.internal, through Docker's port forwarding, which adds overhead. For measurements, advertise the container names and run the client on the Compose network, nova_default. The novad image holds no novabench, so build its image from deploy/pulumi/bench/Dockerfile:

NOVA_ADVERTISE_1=novad-1:7780 NOVA_ADVERTISE_2=novad-2:7780 NOVA_ADVERTISE_3=novad-3:7780 \
  docker compose -f deploy/docker/docker-compose.yml up -d --build
docker build -f deploy/pulumi/bench/Dockerfile -t novabench .
docker run --rm --network nova_default novabench \
  append --addr novad-1:7780,novad-2:7780,novad-3:7780 --streams 4 --size 64KiB --duration 60s

A container's connections all come from one address, and a node holds at most 512 connections from one address (--max-client-connections-per-address). A run that opens more has the rest closed at accept. For a large run, start the stack with NOVA_MAX_CLIENT_CONNECTIONS_PER_ADDRESS=0.

On Kubernetes

deploy/pulumi/bench.sh builds the novabench image, runs it as a Job with one pod per machine, and prints every pod's result. Everything after -- goes to novabench:

deploy/pulumi/bench.sh --machines 3 -- append --streams 4 --size 64KiB --duration 60s --json

Watch the Operations and Writes dashboards while the load rises. See Metrics and dashboards.

See also

On this page