Benchmark command

Benchmark command

nova bench measures a stream's write throughput, acknowledgement and end-to-end latency, and catch-up read speed.

nova bench answers a first question about a cluster: how fast can one stream take writes, and how soon does a reader see them? It writes records to a temporary stream at a steady rate while a subscription reads them back, then reads the whole stream again from the start. It checks every record it reads, so a run also tests that nothing was lost, repeated, or reordered.

nova bench

Benchmarks a temporary stream in the bucket you name, then deletes it.

nova bench [options] <bucket>

Run for ten seconds at 1 MiB/s

On four nodes on one machine, storing records in RustFS:

nova bench demo --duration 10s --catchup-delay 3s
Created temporary stream nova://demo/bench/8671617f-4b93-46d3-9eaa-0104c4cda0b5 (class: standard)
Running for 10s targeting 1 MiB/s with 8192 byte records, Ctrl+C to end early

Write: 0.97 MiB/s, 124 records/s (10493952 bytes, 1281 records in 10.31s)
Read: 0.97 MiB/s, 124 records/s (10493952 bytes, 1281 records in 10.32s)

Ack Latency Statistics (n=1281)                 End-to-End Latency Statistics (n=1281)
min    :   32.80ms                              min    :   46.07ms
p50    :  342.01ms                              p50    :  355.33ms
p90    :     1.34s                              p90    :     1.38s
p99    :     2.28s                              p99    :     2.31s
max    :     2.38s                              max    :     2.42s

Waiting 3s before catchup read...
Catchup: 197.59 MiB/s, 25291 records/s (10493952 bytes, 1281 records in 0.05s)
LineMeasures
WriteRecords Nova acknowledged a second, over the write and the wait for its last acknowledgements
ReadRecords the subscription received a second while the write ran
Ack latencyFrom sending a record to Nova's acknowledgement
End-to-end latencyFrom sending a record to the subscription receiving it
CatchupReading the stream from its first record, 1,000 records a read

On the Standard class, Nova acknowledges a record once its batch is in object storage, so acknowledgement latency follows the storage's latency. RustFS in Docker on a laptop is slow, which the p90 above shows. Run the bench close to the cluster, and compare classes on the same storage. Catchup shows how fast a reader that fell behind gets back to the tail. What sets each number is explained in Appends, Reads, and Storage classes.

Benchmark the Express class

nova bench demo -c express -d 2s -w 0s

On a cluster without Express buckets, the stream is created but the write fails, and the command deletes the stream:

Created temporary stream nova://demo/bench/aff75250-0495-4636-91fc-7d5b3dac9f07 (class: express)
Running for 2s targeting 1 MiB/s with 8192 byte records, Ctrl+C to end early
nova: bench: open the producer: rpc error: code = Unknown desc = writer: no write strategy registered for durability mode express

What the run checks

Each record carries two 8-byte headers, hash and sent-us, counted in --record-size. A read checks that sequence numbers follow each other with no gap, that the size is right, and that each body's hash, chained over every body before it, matches. A record that is missing, repeated, out of order, or changed fails the command with bench: verification failed and exit code 1. Each read must reach the last record within 5 minutes.

The progress lines (Created, Running, Waiting) go to standard error and the results to standard output, so 2>/dev/null keeps only the results. On a terminal, the numbers update live during the write. Ctrl+C ends the write early, prints what was measured, and skips the checks and the catch-up read.

The stream's key is bench/ and a UUID, in the bucket you name, which must exist. The command deletes the stream when it ends, after a failure or Ctrl+C too. If the process is killed first, the stream's records expire after one hour. Without a bucket, the command fails with nova: bench: a bucket is required. A flag out of range fails with exit code 2, for example --record-size must be between 128 and 1048576, got 64.

--class, -cDefaultThe bucket's
The temporary stream's class: standard or express
--record-size, -bDefault8192
Bytes a record, body and headers, from 128 to 1,048,576
--target-mibps, -tDefault1
The write rate in MiB/s, at least 1
--duration, -dDefault1m0s
How long the write runs, at least 1s
--catchup-delay, -wDefault20s
The pause before the catch-up read

For load with many streams, producers, or readers, use novabench; see Benchmarking.

On this page