···6565record, get one record CID/record, and list records from a seeded repo. The
6666implementations are not identical internally. Tranquil measures its metastore
6767handler pool and eventlog path; ZDS measures the local store API, including repo
6868-commit construction and the current process-wide store mutex.
6868+commit construction, per-DID write lanes, and the shared SQLite connection.
69697070| operation | callers | ops | zds | tranquil |
7171|---|---:|---:|---:|---:|
7272| apply/write | 1 | 1000 | 206 ops/s, p95 11.9 ms | not measured at this count |
7373| apply/write | 1 | 5000 | not rerun | 292 ops/s, p95 5.8 ms |
7474-| apply/write | 10 | 10000 | 106 ops/s, p95 119 ms | 436 ops/s, p95 36.0 ms |
7575-| apply/write | 100 | 20000 | 125 ops/s, p95 110 ms | 944 ops/s, p95 119 ms |
7474+| apply/write | 10 | 10000 | 303 ops/s, p95 88 ms | 436 ops/s, p95 36.0 ms |
7575+| apply/write | 100 | 20000 | 1287 ops/s, p95 72 ms | 944 ops/s, p95 119 ms |
7676| apply/write | 1000 | 50000 | not rerun | 1174 ops/s, then read backpressure |
7777| get record | 1 | 1000 | 55k ops/s, p95 25 us | not measured at this count |
7878| get record | 10 | 10000 | 56k ops/s, p95 64 us | 571k ops/s, p95 31 us |
···86868787## write profile
88888989-`write-profile` shows that the current ZDS write path is dominated by serialized
9090-time around the store mutex, not SQLite alone:
8989+`write-profile` tracks where concurrent writes spend time:
91909291| callers | ops | throughput | lock wait | load repo | build commit | sqlite/event |
9392|---:|---:|---:|---:|---:|---:|---:|
9494-| 10 | 500 | 2386 ops/s | 83% | 3% | 8% | 6% |
9595-| 10 | 5000 | 353 ops/s | 82% | 13% | 2% | 3% |
9696-| 100 | 2000 | 1310 ops/s | 98% | 1% | 1% | 1% |
9393+| 10 | 5000 | 708 ops/s | 25% | 26% | 3% | 46% |
9494+| 100 | 2000 | 3683 ops/s | 64% | 10% | 1% | 25% |
97959898-The next write-path work should shrink or restructure the serialized section:
9999-keep validation and request parsing outside the store lock, move toward a
100100-Tranquil-style write worker/queue for repo mutation, and avoid rebuilding more
101101-repo state than a single write needs.
9696+ZDS now separates repo ordering from database serialization: writes take a
9797+per-DID lane before loading and mutating the repo, then use the DB mutex for the
9898+shared SQLite connection. The next write-path work should continue toward the
9999+Tranquil shape: bounded write queues with explicit backpressure, less full-repo
100100+state loading, and a narrower SQLite persistence phase.
102101103102## comparison work
104103