1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Split-reader pilot calibration
These historical latency measurements used `std.process.Init.gpa`, which is
SafeAllocator in this Zig 0.17 ReleaseSafe build, rather than production zlay's
explicit `c_allocator`. Both engines' Zig wrappers used it, while RocksDB's
internal C++ allocations followed its own allocator path. Treat the timings as
harness-specific diagnostics until the allocator-parity rerun is analyzed; they
are not a production-matched latency result. Raw observations are retained.
This finite Fly run validates the revised harness and integration. It is not a
relay-capacity result or a steady-state endurance test.

The VM had two performance CPUs, 4 GiB RAM and a 1 GiB local Fly volume in ORD.
The source revisions, exact file and binary hashes, VM metadata and verified app
cleanup are in [the resource manifest](zkv-load/fly-reader-pilot/fly-resources.json).
No relay, upstream stream, production resource or heavypad workload was started.
All benchmark load was generated inside the disposable VM.
Each engine started with the same 65,536 collection/DID pairs and received
5,000 planned membership requests over five seconds, 10% novel. Sixteen native
workers consumed a bounded 4,096-entry ingress queue. A full queue blocks the
producer; all planned requests must complete and verify. A zio scan task issued
100 pages/second, each with 100 expected DIDs, using varying cursors in the
initial key range. Reads were warmed once before timing. The load target used
zio with four executors, matching the relay's default executor setting.
RocksDB used its original per-request WriteBatch calls from the workers. Both
RocksDB modes enable WAL; only the synced control forces per-call sync. zkv used
the real pilot owner with up to 16 requests, a 1 ms aggregation window, duplicate
elision, independent reader/refresh, and scheduled flush/compaction/collection.
These are matched logical membership requests and verified pages, with the
engines' different publication and batching mechanisms retained.
| Adapter | Write ack p50 | Write ack p99 | Scan p99 |
|---|---:|---:|---:|
| RocksDB default | 0.136 ms | 0.234 ms | 0.198 ms |
| RocksDB synced | 0.414 ms | 0.625 ms | 0.201 ms |
| zkv pilot | 0.129 ms | 2.144 ms | 0.675 ms |
Latency starts at planned arrival, including producer lag and ingress/owner
queueing. Every run verified all 66,036 final pairs after reopen. There were no
failed writes or blocked producer submissions. zkv executed one adapter
maintenance cycle lasting 11.56 ms, included in its timing. The zero adapter
maintenance fields for RocksDB do not mean no background maintenance; that
engine schedules its own flush and compaction internally.
Three Linux one-executor runtime checks also passed: a 200 ms reader-mutex hold
delayed the unrelated timer to 202 ms with Threaded reader Io, while zio reader
Io allowed the timer to complete at 10 ms and the queued live write at 1 ms.
See [runtime observations](zkv-load/fly-reader-pilot/runtime.csv).
## Harness corrections
The earlier worker-only screen omitted the relay's ingress queue. Its rejected
requests cannot establish whether the relay could catch up under backpressure.
The replacement harness blocks on a full ingress queue and retains every planned
request in its latency accounting.
An initial native one-executor smoke run also exposed calling-thread starvation:
the native producer loop occupied executor 0, and the scan task started only
when awaited after the producer finished. The corrected producer runs on a
separate native thread while the calling thread immediately awaits the scan.
First-scan dispatch delay is exported separately to expose this class of error.
The cached zio runtime options make the calling thread executor 0 by default.
## Remaining qualification
The scan and write tails remain slower than RocksDB in this small calibration.
Do not infer that the previous near-second stalls are resolved at a one-million-
pair index, or that this run has enough maintenance cycles to establish stable
capacity. Compare zero-delay natural grouping with the current 1 ms window at
larger cardinality before selecting that policy. Measure upstream backlog and
longer tails, and exercise batching recovery and cursor failures before a
migration decision. Validation, networking, Postgres and event-log service time
are excluded here; these index-only numbers cannot certify complete relay scale.
Raw [results](zkv-load/fly-reader-pilot/results.csv),
[environment](zkv-load/fly-reader-pilot/environment.txt),
[suite](zkv-load/fly-reader-pilot/suite.sh), and
[progress](zkv-load/fly-reader-pilot/progress.txt) are retained.