Benchmarking #
This page describes how to measure the engine. It deliberately contains no performance numbers: a number without the commit, hardware, backend and flags that produced it is noise.
Load generators that work #
redis-benchmark and memtier_benchmark both work, because the wire protocol is RESP.
# baseline: one connection per request, no pipeline
redis-benchmark -h 127.0.0.1 -p 11001 -t set,get -n 200000 -c 50
# pipelined
redis-benchmark -h 127.0.0.1 -p 11001 -t set,get -n 1000000 -c 50 -P 16
# mixed, with memtier
memtier_benchmark -s 127.0.0.1 -p 11001 --protocol=redis \
--clients=50 --threads=4 --ratio=1:1 --test-time=120 --key-pattern=S:S
What they will not exercise:
| Not covered | Why |
|---|---|
SCAN/XSCAN pagination | No built-in workload; drive it from a script |
| Cluster redirects | Benchmark against the leader, or expect -MOVED in the error count |
| TTL expiry pressure | Add EX to the SET payload and watch INFO Store |
| Raft apply latency | The write is acknowledged after quorum; add nodes to see the delta |
What to hold constant #
Record all of these with any result, or the number is not comparable:
- Commit —
git rev-parse HEAD, and theBuildVersionfrom-h. - Backend —
--storage-backend, and forbadger/hybriddbthe host’s RAM (the drivers open with 1 GB memtable/large caches by default). - Durability —
--nosyncon or off. This is usually the single largest factor on writes. - Cluster size and read mode — 1 node vs 3 nodes;
--openreadsvs leader-only. - Client side — connection count, pipeline depth, value size, and whether the client is on the same host (loopback hides the network).
Workloads worth running #
| Workload | Command shape | What it tells you |
|---|---|---|
| Point write | SET key <256B> | Raft + storage write path |
| Point read | GET key | Cache + storage read path |
| Counter | INCR hits | Read-modify-write inside the apply loop |
| Hash write | HSET k f v | Multi-record encoding cost |
| List push/pop | RPUSH q v / LPOP q | Index encoding, meta updates |
| ZSet write | ZADD board <score> m | Two indexes per member |
| Range read | ZRANGE board 0 100 WITHSCORES | Index scan efficiency |
| Fat value | SET k <64KiB> | Allocation, reply size, GC pressure |
Reading the server side while you load it #
watch -n1 'redis-cli -p 11001 INFO | sed -n "/# Store/,/# Mem/p"'
curl -s http://127.0.0.1:11002/metrics | grep icefiredb_connected_clients
INFO gives per-process counters (get, get_missing, put, batch_commit, and their total times),
which is usually more informative than the load generator’s own percentiles: a rising
batch_commit_total_time with flat throughput means the storage device, not the engine, is the limit.
Anti-patterns #
- Benchmarking a follower without
--openreads. Every read becomes a redirect and the number measures your client’s retry loop. - Comparing
--nosyncruns against durable ones. Different guarantees; report both or neither. - Using
LINSERT/LREMin a throughput test. They rebuild the whole list; they measure O(n) rewrites, not list performance. - Ignoring the apply loop. Throughput is bounded by one apply goroutine, so more client threads stop helping at some point; find that point instead of assuming it away.
- Quoting numbers from this page. There are none, on purpose.