Browse documentation

FyroDB documentation

Benchmarks

Native TCP and in-process throughput, peak memory, and historical worker-scaling results.

Native benchmark results

With 12 workers, FyroDB served 49.75M GET/s and 44.27M SET/s over loopback TCP. Calling the engine directly reached 128.74M GET/s and 82.59M SET/s. Each KV phase processed ten million operations on five-byte values.

Median throughput in millions of operations per second for pipelined GET and SET over TCP and in-process

The TCP server reached 1,096 MiB peak RSS and averaged 545 MiB. The embedded benchmark process, which includes the driver and store, peaked at 863 MiB. These are medians of whole-suite measurements from three fresh runs of revision 021baed on an Intel Core i5-11400H. The server and Go client shared all six physical cores and twelve hardware threads.

Repeated-key GET

A separate embedded run issued 64 GETs for the same key per batch, changing keys between batches across 65,536 populated keys. It produced 993.71M logical GET replies/s across 25,165,824 replies per run. For a non-expiring value in a protected batch, the engine can look it up once and emit a complete RESP reply for every GET. The chart above uses distinct keys.

All native workload medians

Rates are operations per second. Pub/Sub delivery counts recipient messages. The embedded suite credits logical operations for batched storage calls. Each TCP run verified ten million recipient deliveries.

WorkloadGo TCPRust in-process
Pipeline-64 SET15.92M20.48M
Pipelined SET44.27M82.59M
Pipelined GET49.75M128.74M
Pub/Sub publish3.25M194.83M
Pub/Sub delivery121.73M6.693B
Mixed SET/GET (50/50)44.51M37.11M
INCR (atomic counters)104.91M2.788B
HSET/HGET (sessions)49.79M333.40M
LPUSH/RPOP (queue)58.16M333.42M
SADD (per-client sets)54.89M172.60M
ZADD (per-client zsets)14.44M26.67M
JSON.SET (documents)13.83M19.99M
JSON.GET (documents)29.68M53.24M
SET+EXPIRE (cache TTL)5.98M21.61M
Hot Key (1 key, contention)186.09M19.07M
Producer/Consumer (50+50)30.23M103.89M
XADD (streams)24.27M5.72M
SETBIT/BITCOUNT (bitmap)29.11M77.40M
PFADD/PFCOUNT (HyperLogLog)68.74M312.61M
GEOADD/GEODIST (geospatial)8.31M19.30M
Vector HSET load134.34k1.12M
Vector KNN-10165187
Vector KNN-10 +tag filter4291.73k
Filter Tag+Num4.01k3.67k
Text term55.81k158.02k
Text + Tag27.76k82.99k
Text negation19.90k24.24k
Vector KNN-10 (8 clients)390—
Vector HNSW KNN-104.07k5.97k
Vector HNSW M=32 KNN-102.14k2.40k
Vector KNN-10 (12 clients)—1.10k

The Go vector suite loaded 50,000 documents with 768-dimensional vectors. Its sampled recall@10 was 1.0 for both FLAT queries in every run. HNSW recall@10 ranged from 0.1 to 0.3 at M=16 and from 0.3 to 0.5 at M=32. These recall samples use one query per index.

For embedded vector load, parallel KNN, the hot-key workload and the producer/consumer workload, the table uses the counts scheduled across all 12 workers. The sample file also records the harness's original counts.

PostgreSQL cache-path smoke results

The smoke benchmark uses two cache workers or two TCP clients and reduced iteration counts. These short runs are sensitive to host activity.

PathMedian ops/s
In-memory cache lookup33.40M
Encoded cache lookup37.58M
JOIN parse + cache lookup26.69M
Extended protocol TCP1.45M
Simple query TCP1.75M

Correctness checks

The same source tree passed 836 Rust workspace tests, with three performance probes ignored. All six native end-to-end suites passed. With 12 workers, Lua and MULTI/EXEC each preserved the 64,000 balance with zero inconsistent snapshots, and WATCH accounted for every committed update. Binary values through 1 MiB survived restart.

Reproduce the native runs

Run from the repository root on a host with twelve logical CPUs. The TCP measurements use the native launcher’s allocator settings and 100 loopback clients. The deep pipeline sends batches of 2,500 requests per connection with a separate reply reader. Each round used a fresh process for each suite. Repeat three times and take the median of each workload.

cargo build --release --locked --bin fyro_db
FYRODB_BIND=127.0.0.1 FYRODB_WORKERS=12 ./scripts/bench_local.sh -m all -json tcp.json
FYRODB_WORKERS=12 cargo bench --locked --bench without_tcp -- all --json embedded.json
cargo bench --locked --bench pg_cache_bench -- --smoke

Save each round under a separate filename to retain its samples. To reproduce the repeated-key run from this checkout, save the linked driver as examples/repeated_get.rs and run cargo run --locked --profile bench --example repeated_get. Per-run measurements and operation counts · Repeated-key driver

Historical Docker benchmarks

Checkpoint d5a178b

Throughput by worker count

Explore the archived Go TCP measurements across five Docker CPU configurations on the Intel i5-11400H.

3 runs median5 bytes KV valuesGo client TCP suite

Throughput

Pipelined GET

Millions of operations per second

Workload
Pipelined GET

The 12-worker run shared CPUs with the client. The other configurations used separate client CPUs.

Memory

Peak server RSS

Whole-suite peak, in MiB

1 workers782
2 workers795
3 workers797
6 workers1297
12 workers · shared1597
Archived results and methodology

Docker TCP suite at d5a178b

Wide graphs and tables scroll horizontally on small screens. Select a graph to open its full-size SVG.

The retained runtime is checkpoint d5a178b, measured as Docker image 3d5ef33d50f9. Our normal TCP suite measured 47.419M GET/s and 37.704M SET/s with six workers on three physical cores plus SMT. The separate twelve-worker shared-client case measured 55.897M GET/s and 43.347M SET/s. These are three-run medians under the stated CPU budgets.

This update publishes existing measurements. The later SET-admission experiment was reverted; its results and the six retained regression tests are documented below.

Our Go TCP suite appears first because it covers the complete KV, Pub/Sub and mixed workload set. These are three-run medians, with one full warmup discarded, on an Intel i5-11400H with six physical cores and twelve hardware threads. Each engine ran separately. Fixed-client tests put the server on CPUs 0,1,2,6,7,8 and clients on 3,4,5,9,10,11. Two and three workers use two and three physical cores; six workers use three physical cores with SMT. The twelve-worker experiment shares all CPUs with its client and is a separate resource budget.

Both processes ran in Docker at verified niceness 0, using host loopback networking. The server cap was 4 GiB, client cap 1 GiB, with swap disabled. A fixed CPU allocation and equal niceness prevent a lower-priority native client from skewing a Docker-server comparison. The benchmark runner rejects unequal client/server priorities and requires an explicit flag before client/server CPUs can overlap.

All normal workloads

Rates below are millions of completed operations per second; Pub/Sub delivery is millions of recipient messages per second. Peak RSS and peak container memory are separate whole-suite measurements. Memory is workload-dependent; there is no fixed sub-900-MB ceiling.

Metric (M/s unless marked)1 worker2 workers3 workers6 / SMT12 / shared
Pipeline-64 SET4.9217.1599.10513.24014.561
Pipelined SET17.38227.60532.25137.70443.347
Pipelined GET20.13032.96244.61647.41955.897
Pub/Sub publish1.5222.3732.8452.3602.142
Pub/Sub delivery73.600116.457141.007116.361104.294
Mixed SET/GET (50/50)17.03327.56633.51537.98446.372
INCR (atomic counters)13.96027.31330.38645.85873.887
HSET/HGET (sessions)17.07526.45435.95939.97759.965
LPUSH/RPOP (queue)9.92311.81121.43930.17738.505
SADD (per-client sets)15.78929.49337.84739.43248.798
ZADD (per-client zsets)4.9758.77011.4918.44410.610
JSON.SET (documents)4.4276.8768.8527.32210.310
JSON.GET (documents)11.82618.38722.29825.00128.341
SET+EXPIRE (cache TTL)3.2925.3777.9967.8089.769
Hot Key (1 key, contention)39.32867.387107.014118.612160.608
Producer/Consumer (50+50)8.96215.40716.3723.27013.421
XADD (streams)4.5957.90210.44115.04115.792
SETBIT/BITCOUNT (bitmap)4.5408.12612.90214.91223.238
PFADD/PFCOUNT (HyperLogLog)17.71735.04734.33353.09559.769
GEOADD/GEODIST (geospatial)1.6943.1224.0645.1785.667
Peak RSS (MiB)782.3794.6797.11296.51596.8
Peak container (MiB)805.7818.0821.81308.21609.2

The KV phases each execute 10 million operations, with 100 clients and 100,000 operations per client. The main GET/SET pipeline is 100; Pipeline-64 SET is a separate insertion phase. Ordinary mixed phases execute 2 million operations; the hot-key phase executes 10 million. Pub/Sub uses 50 subscribers, ten publishers and 200,000 published messages, and verifies all ten million recipient deliveries per suite. The table includes insertion, overwrite, contention, collections, TTL, streams and fan-out rather than only the fastest GET case.

Earlier peaks and Docker medians

The previously published 53.38M GET, 39.62M SET, 108.56M INCR and 113.98M subscriber deliveries/s remain available in historical benchmarks. They were reported as best-of-three results, and some were duplicated under both TCP and direct-engine headings. Their original workload/build details are incomplete.

Higher historical values are preserved as historical references; they are not substituted for slower current medians. The archived twelve-worker GET median was 55.897M/s, but that shared-client run is not a matched before/after speedup over the older 53.38M figure. Compare like-for-like runs, payloads, clients and CPU budgets.

Why client methods report different rates

The normal suite's KV values are five bytes. Both the Go suite and redis-benchmark use TCP, but their pipeline depths, key distributions, client CPU budgets and response-processing costs differ. A four-thread stock client and a multi-process capacity diagnostic also measure different load-generator budgets. Compare an optimization with the same client and parameters; a gap between different clients is not itself a server speedup or regression.

Independent standard-client tests

Retained FyroDB versus Dragonfly: 5 B through 10 KiB

The official, unmodified redis-benchmark 8.8.3 client ran with 64 connections, four client threads, pipeline 256 and 100,000 fully populated random keys. Each command executes ten million requests through 1 KiB and two million for larger values, with warmups and three measured rounds. Persistence and eviction are disabled for this in-memory comparison. Both servers have the same 3 GiB memory cap and CPU allocation; their exact immutable image IDs and launch flags are archived with the samples.

The FyroDB column is the retained 3d5ef33d50f9 image. Dragonfly is a single server process using the same allocated worker count; this comparison is not against a Redis cluster.

Four client threads can limit or quantize the reported rate. These rates should not be interpreted as the hardware limit. Contention indicators, image IDs, all three samples, sampled peak RSS and container memory are available in the standard-client records. Reused peer samples are explicitly marked in those records.

Earlier standalone Redis comparison

A separate, earlier campaign tested FyroDB, Dragonfly and standalone Redis with 64-byte values, one million populated keys, pipeline 1/16/64/256 and three rounds. The campaign included single-core and multicore runs. The FyroDB image was 5823ed9fc45c, an earlier build, so these are not current-checkpoint results. The multicore Redis configuration used I/O threads; command execution remained single-threaded.

The historical summary recorded medians without ranges.

Multi-process capacity diagnostic

Six independent processes, each running the unmodified official client without client threads, tested whether a single load-generator process was limiting throughput. Total completed requests were divided by the slowest reported client duration. This is a separate aggregate diagnostic, not the score of one redis-benchmark invocation and not the normal Go suite. The same client count, CPU budget, keyspace and pipeline were used for both servers.

Other benchmark methods

  • Scalar standard-client guard: pipeline 1, no client threads, 64 connections, one million requests per command; one/six workers and 64 B/1 KiB values. The latest campaign compares the checkpoint with the rejected admission candidate.
  • Independent memtier cross-check: an earlier 64 B probe used four threads, sixteen clients per thread, pipeline 64, a one-million-key random workload and five-second GET/SET windows. It has one measured attempt per command/build and is a smoke cross-check, not a statistically established current speedup.
  • Direct Rust engine: without_tcp removes sockets and client parsing. Batched APIs may credit equivalent logical operations. Its ops/s and inverse-throughput ns/op are not TCP request/reply rates or measured latency percentiles. Earlier direct and stable campaigns are listed in the downloadable campaign index.
  • Custom RESP and hot-key clients: used for targeted copying, concurrency, aliasing and capacity diagnostics; they are labeled separately from the standard client.
  • Latency, memory, ANN and proxy modes: the Go client supplies lat, mem, ann, vec and pgcache modes. These are supported measurement tools; the archived KV campaign measured throughput separately from ANN recall, open-loop latency and PostgreSQL performance. Historical vector/proxy figures remain historical.
  • Hardware counters: instruction, cache and locked-access diagnostics investigate mechanisms. They do not establish end-to-end server throughput on their own.

Algorithms retained in the runtime

The checkpoint retained guarded value access, script/transaction isolation, snapshot pre-images and WATCH invalidation. Architecture explains the protection layers.

The retained large-payload changes use bounded scatter/gather replies, one guard per unique entry, a stack ownership index for duplicate entries, partial-write copying before guards drop, tiled SET prefetch and conditionally streaming large overwrites. The streaming path fences stores before publishing completion; repeated hashes conservatively select ordinary cached copying. It adds no persistent per-key or per-connection field.

These graphs show all selected metrics for each cohort, including regressions and unchanged cases. The evidence manifest also lists the small-payload acceptance and scaling records; only image-matched samples are credited to the retained runtime.

Rejected lock-reduction experiment

An outlined handler reused write admission across adjacent small-value SET batches in a deep parser buffer. It retained the existing entry locks, snapshot hooks, replication/AOF routing and command boundaries. It passed correctness checks, but throughput varied materially and several medians were lower. Both experimental runtime changes were reverted. Only the regression tests were kept.

The campaign contains 84 timed samples plus eight full Go warmup suites: normal suites at one/three/six workers, a separate twelve-worker shared-client case, standard P256 cases at 64 B/1 KiB/10 KiB and scalar P1 cases at 64 B/1 KiB. All attempts are retained. A control measured the identical checkpoint image under both labels and demonstrated substantial host variation. A/A samples.

A separate hardware diagnostic observed about 0.48% fewer retired locked-access load instructions per SET. This is neither a mutex-acquisition count nor a throughput improvement. Diagnostic details · acceptance decision · experimental patch.

Earlier counter-striping and broader admission trials were also rejected or superseded. The campaign viewer links all 23 archived summary campaigns and the manifest includes the available trial state records. Earlier native-client/Docker-server priority mismatches are not the current normal-suite reference.

Safety and regression coverage

The retained source passed 789 workspace tests, zero failures, with three existing performance probes ignored, plus 14 large-reply tests with the io-uring feature, Clippy across all targets with io-uring, formatting and diff checks. These counts are a recorded validation snapshot, not a guarantee about future changes.

New regressions cover:

  • Deep binary SET pipelines followed by GET, EVAL, WATCH, MULTI/EXEC and NX fallback on one/six workers.
  • Incomplete and malformed protocol packets releasing write admission, and resuming a fragmented command.
  • SET+EXPIRE boundaries and mixed 257 B, 4 KiB and 10 KiB payloads.
  • Nested writer-scope cleanup and preservation of an already-active writer scope.
  • Concurrent deep SET/read/SAVE traffic, complete payloads and WATCH aborts after 64/1024-command write pipelines.

The retained release image's isolation stress ran Lua transfers, MULTI/EXEC transfers and WATCH compare-and-set for 15 seconds each, twelve writers and four readers, on one/six workers. All six cases passed with zero inconsistent snapshots and zero errors. Lua and MULTI transfers preserved the 64,000 total; each WATCH compare-and-set counter matched its expected successful-update count. SAVE/restart covered thirteen data types in two configurations, plus two affinity checks and three queued-large-reply cases. The rejected candidate also passed these checks; correctness alone did not justify retaining it.

Retained source checks · retained-image isolation · candidate-image isolation · restart checks.

A preliminary full-suite reference with a 3 GiB server cap was OOM-killed; it is recorded in the scaling checks rather than silently counted as a successful run. The matched normal suites use 4 GiB for both builds and had zero OOM kills. Scaling checks.

Reproduce the measurements

Build a local server image, then choose CPUs for your own topology; the example allocation below is specific to this six-core/SMT host. Use a fresh output directory. The runner builds an unchanged static Go client if no client binary is supplied.

docker build -t fyrodb:local .
python3 scripts/bench_docker_normal.py \
  --server current=fyrodb:local --workers 1,2,3,6 \
  --server-cpus 0,1,2,6,7,8 --client-cpus 3,4,5,9,10,11 \
  --runs 3 --warmups 1 --memory 4g --client-memory 1g \
  --out temp/bench/normal-new

Run the shared-client case separately:

python3 scripts/bench_docker_normal.py \
  --server current=fyrodb:local --workers 12 \
  --server-cpus 0-11 --client-cpus 0-11 --allow-shared-cpus \
  --out temp/bench/shared-new

For an independent client against a separately started, disposable server, this command is an example of the P256 workload, not a complete reproduction of all archived preloading and verification steps:

docker run --rm --network host --cpuset-cpus 3,4,5,9,10,11 \
  --memory 1g --memory-swap 1g redis:8.8.3 \
  redis-benchmark -h 127.0.0.1 -p 8000 --threads 4 \
  -c 64 -P 256 -n 10000000 -r 100000 -d 64 -t set,get --csv

Prepopulate every requested random key, verify DBSIZE and sampled values, run warmups, alternate server order and preserve every result before comparing. -d changes the value size; do not change value size without preloading that cohort again. For 4 KiB and larger cohorts the archive uses two million requests per command. Pin immutable server/client image IDs for an exact replay; tags can change.

The raw records preserve exact launch commands, keyspace, payloads, sample reuse, host-pressure and memory fields. task bench-stable offers the separate native pinned runner, task memtier runs the independent load generator, and cargo bench --bench without_tcp exercises the engine without TCP. A standard-client score and a batched engine score measure different work.

To regenerate these docs and graphs from the committed evidence:

cargo test --workspace
cargo test --features io-uring --test large_replies
cargo clippy --workspace --all-targets --features io-uring -- -D warnings

The generator verifies evidence hashes, checks the normal-summary medians against the raw equal-priority samples, validates retained-image identities and emits deterministic SVGs, JSON and CSV. The evidence archive includes historical summaries without relabeling them as current results.