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
# Allocator parity changes the measured baseline

The earlier ReleaseSafe harness used `std.process.Init.gpa`, which is
SafeAllocator in this installed Zig 0.17.0, even when linked with libc.
Production zlay explicitly uses `c_allocator`. This was a material mismatch for
the zkv path. It affected both engines' Zig wrappers, but RocksDB's internal
C/C++ allocations did not switch to SafeAllocator.
The corrected harness explicitly chooses the storage and Threaded/zio runtime
allocator in both controls. The default is C; `--allocator=process` selects the
ReleaseSafe process allocator. Trace arrays remain in the process arena and are
prepared before timing. The corrected result is a production allocator match,
not a full-relay capacity measurement or complete runtime configuration match.
## Paired result
Two trials of each control ran in reverse order on one disposable Fly VM. Each
starts from one million memberships and receives 150,000 planned requests in
30 seconds, 10% novel, plus 100 varied pages/sec. Every request completes, and
every trial verifies all 1,015,000 expected pairs after reopen. Both controls
retain WAL/durable-publication semantics; RocksDB requests sync. zkv retains
duplicate elision, up to 16 grouped requests, no aggregation wait and the
256-segment / 4 MiB maintenance triggers. These match logical work, not physical
write batches. Queueing changes grouping, so changed-commit and maintenance
counts are reported rather than assumed identical.
| Adapter / allocator | Write ack p50 | Write ack p99 | Scan p99 | Adapter maintenance |
|---|---:|---:|---:|---:|
| RocksDB synced / C | 0.492–0.506 ms | 0.775–0.803 ms | 0.328–0.331 ms | internal |
| RocksDB synced / Safe | 0.493–0.510 ms | 0.772–0.818 ms | 0.331–0.361 ms | internal |
| zkv / C | 0.367–0.383 ms | 551.186–552.892 ms | 3.739–3.815 ms | 7.761–8.329 s |
| zkv / Safe | 156.164–174.014 ms | 974.928–988.843 ms | 4.179–4.227 ms | 13.267–13.441 s |
Latency starts at planned arrival. C allocation prevents producer blocking in
these trials, though the ingress queue still peaks at 2,938–2,954 requests.
SafeAllocator fills the 4,096-entry queue and blocks 2,337–2,414 submissions.
The large median difference includes this queueing effect; it is not the cost
of one allocation. All planned requests remain included when the producer is
blocked. This finite trace does not establish long-run backlog equilibrium.
zkv spends 7.087–7.642 seconds compacting with C allocation, versus
12.584–12.746 seconds with SafeAllocator. It performs 54–55 maintenance cycles
and about 14.0k changed commits with C, versus 51 cycles and 13.2k changed commits
with SafeAllocator. Those are adaptive grouping differences under the same
logical trace. Reopen takes 39–45 ms versus 52–53 ms, with filesystem caches
retained. Neither measurement is cold-machine recovery.
Allocator choice materially affected the historical results. It does not by
itself remove the write-maintenance tail. The next engine measurements must use
explicit consumer allocators and preserve this corrected baseline. No conclusion
to abandon zkv follows from either allocator result.
## Evidence and limits
Core zkv remains at `eca4fd1`: the range-compaction candidate is intentionally
excluded, isolating allocator choice. The VM had two performance CPUs, 4 GiB RAM
and a 1 GiB ext4 volume in ORD. Binaries are ReleaseSafe x86_64-linux-gnu, zio with
four executors. This remains an index workload; production novelty, networking,
validation, event-log persistence and Postgres are not represented.
Allocation counts and bytes copied, CPU samples, physical reads and hardware
cache misses are not inferred from these latency measurements. Separate small
allocator-growth instrumentation and generated-code inspection are recorded in
the experimental core worktree's `docs/allocator-comptime.md`. Those are not yet
actual zeldi workload qualification.
The [manifest](zkv-load/fly-allocator-parity/fly-resources.json) contains compiler
version, exact source/core and binary hashes, completed-suite status and
verified app/volume cleanup. The
[combined CSV](zkv-load/fly-allocator-parity/results.csv) is formed from the union
of per-case headers, preserving missing telemetry as empty cells. The raw
`result-0.csv` through `result-7.csv` files retain each engine's actual header;
RocksDB's absent phase counters are not interpreted as zero background work.
The [suite](zkv-load/fly-allocator-parity/suite.sh) records order and flags.
All load ran inside the disposable VM; production and heavypad were untouched.