Skip to content

Benchmarks

Every number on this page comes from a benchmark in the repository’s benchmarks/ directory or a recorded measurement artifact next to it. Each one states what it measures, on what machine, and what it does not show. Treat them as reproducible baselines, not service-level promises.


The read path is the part that matters most: it runs in your request handlers.

BenchmarkWhat it measuresCommandResult
detent_read_benchSteady-state Client read throughput, 4 threadsdetent_read_bench 4 20000006.71M ops/s (149.1 ns/op)
detent_hash_benchstable_bucket() alone (SHA-256 rollout hash)detent_hash_bench 50000005.05M calls/s (198.2 ns/call)

Measured on one 14-core arm64 development machine, Release build.

Rollout reads pay for one SHA-256 of the knob name plus hash value; plain bool and int reads don’t hash at all.


BenchmarkWhat it measuresCommandResult
detent_update_benchParse + validate + merge for a 100-knob snapshotdetent_update_bench 200000 10028.6K updates/s (35.0 µs/update)

Updates run on the background thread, never on the read path.

The scale benchmark uses a synthetic corpus of 100 namespaces, half bool and half int, with two group overrides per bool. Release build on macOS x86_64, Apple Clang 17. Medians of five repetitions at 100,000 knobs and three at 500,000.

KnobsJSON bytesJSON parseApply one-knob patchFlat image encode
100,00011,123,377296.130 ms148.624 ms19.778 ms
500,00056,283,3771,708.244 ms780.557 ms108.445 ms

Applying a patch to a JSON snapshot copies the whole map, which is why a one-knob change costs as much as it does at this size. The durable authority was built to remove exactly that cost:

KnobsWhole-snapshot patch, medianAuthority update, medianTree nodes allocated per update
100,000133.708 ms0.0127 ms26
500,000668.599 ms0.0113 ms27

Those are application-only measurements: no I/O, HTTP or replication. With durable POSIX storage and 64 producers grouped per commit, the authority measured about 490 transactions per second on a local disk, with a 500,000-knob state consuming about 0.042 CPU cores at that rate. See Authority for the full tables.

Terminal window
build/benchmarks/detent_scale_bench 100000 5
build/benchmarks/detent_authority_bench 500000 uniform 2
build/benchmarks/detent_authority_durable_bench .scratch/authority-500k 500000 64

Release builds on macOS x86_64, stripped. Idle RSS is the median of five samples after one second of startup, with an agent with one small defaults file.

ExecutableStripped sizeIdle RSSThreads
detent-agent475,520 bytes1,316 KiB2
detent257,864 bytesnot sampled1

These are idle resident-memory samples, not peak allocation or throughput measurements.


The raw artifacts live in benchmarks/*.json, each with its corpus, hardware and build details.