···11# zds
2233-a zig implementation of an at protocol personal data server.
33+an at protocol personal data server.
4455> name credit: jim (`calabro.io`) suggested `zds`.
66
+37-20
bench/README.md
···1313just bench repo
1414just bench blob
1515just bench metastore 10 1000
1616+just bench write-profile 10 500
1617just bench run --scenario write --records 10000
1718```
1819···2728- `blob`: blob write/read against disk blobstore plus SQLite metadata.
2829- `metastore`: Tranquil-shaped apply/get/list benchmark with caller counts and
2930 latency percentiles.
3131+- `write-profile`: `applyWrites` stage timing under write concurrency.
30323133Each run uses temporary SQLite and blobstore state.
3234···36383739| scenario | zds |
3840|---|---:|
3939-| write records | 294 ops/s |
4141+| write records | 144 ops/s |
4042| list records | 30k ops/s |
4141-| write repo car | 226 ops/s, 449 MB/s |
4242-| blob put+get | 5.6k ops/s, 697 MB/s |
4343+| write repo car | 252 ops/s, 440 MB/s |
4444+| blob put+get | 368 ops/s, 46 MB/s |
43454446## Tranquil comparison
4547···67696870| operation | callers | ops | zds | tranquil |
6971|---|---:|---:|---:|---:|
7070-| apply/write | 1 | 1000 | 259 ops/s, p95 8.7 ms | not measured at this count |
7171-| apply/write | 1 | 5000 | did not finish in 150 s | 268 ops/s, p95 4.1 ms |
7272-| apply/write | 10 | 10000 | 172 ops/s, p95 48.3 ms | 738 ops/s, p95 16.0 ms |
7373-| apply/write | 100 | 20000 | 1531 ops/s, p95 32.1 ms | 888 ops/s, p95 123.9 ms |
7474-| apply/write | 1000 | 50000 | did not finish in 150 s | 1169 ops/s, then read backpressure |
7575-| get record | 1 | 1000 | 94k ops/s, p95 15 us | not measured at this count |
7676-| get record | 10 | 10000 | 88k ops/s, p95 14 us | 339k ops/s, p95 49 us |
7777-| get record | 100 | 20000 | 82k ops/s, p95 849 us | 425k ops/s, p95 349 us |
7878-| list records | 1 | 1000 | 58k ops/s, p95 18 us | not measured at this count |
7979-| list records | 10 | 10000 | 53k ops/s, p95 22 us | 33k ops/s, p95 411 us |
8080-| list records | 100 | 20000 | 44k ops/s, p95 941 us | 33k ops/s, p95 3.6 ms |
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 |
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 |
7979+| get record | 100 | 20000 | 63k ops/s, p95 4.1 ms | 571k ops/s, p95 244 us |
8080+| list records | 1 | 1000 | 51k ops/s, p95 22 us | not measured at this count |
8181+| list records | 10 | 10000 | 51k ops/s, p95 21 us | 38k ops/s, p95 309 us |
8282+| list records | 100 | 20000 | 51k ops/s, p95 21 us | 37k ops/s, p95 3.0 ms |
8383+8484+The 1000-caller Tranquil run reached 1174 apply commits/sec, then the next read
8585+phase failed with `metastore handler backpressure` on this machine.
8686+8787+## write profile
8888+8989+`write-profile` shows that the current ZDS write path is dominated by serialized
9090+time around the store mutex, not SQLite alone:
9191+9292+| callers | ops | throughput | lock wait | load repo | build commit | sqlite/event |
9393+|---:|---:|---:|---:|---:|---:|---:|
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% |
81978282-The ZDS 1-caller/5000-write tier and 1000-caller/50000-write tier were stopped
8383-after roughly 150 seconds. The 1000-caller Tranquil run reached 1169 apply
8484-commits/sec, then the next read phase failed with `metastore handler
8585-backpressure` on this machine.
9898+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.
8610287103## comparison work
88104···101117- full repo export cost
102118- blob/block store throughput
103119104104-Tranquil already measures latency percentiles. ZDS should add p50/p95/p99
105105-latency reporting before we treat the comparison as mature.
120120+ZDS and Tranquil both report latency percentiles for the metastore-shaped
121121+benchmark. The remaining comparison gap is broader coverage of blockstore,
122122+eventlog, and full repo export behavior.