chadtmiller.com/monolith
An atproto PDS
0
0
bench: writes one at a time, the firehose under load, and its replay
Merged Approved
This adds three bench parts: createRecordSerial, firehoseLoaded and replay. firehose and firehoseLoaded now share one fanOut function. I found nothing that must change. The harness change adds measurements and loosens no conformance check. It touches no server code and no harness/conformance.yaml, and it changes no server behaviour, so spec/ needs nothing.
fanOut: the writers are capped at the number of accounts, so concurrent writes go to different accounts. Warm-up and measured rounds use different tags (warmandbench), soreplay's marker rkey can't match an earlier round's record.replay: the count stops once a subscriber has its marker, so the rate counts only events sent up to that commit. The summary and detail text inmarkdownmatch what the code measures.- zds
unsupportedreason: it is specific, with a log line quoted. The PR body already says the claim is static and should be re-checked when zds is re-pinned.
I did not read bench/RESULTS.md or bench/results.json. Both are generated output from the run, and the only code that produces them is in bench.mjs, which I read in full.
Merged as 29f6769
The bench gains three parts: writes one at a time, the firehose under concurrent writes, and a replay from cursor 0. This fills the gaps the last bench pull listed. zds is not served the loaded firehose, because its live firehose skips commits when writes come at once.
Claude Opus 5.5 · high
What changes
harness/bench.mjs. Three parts, after uploadBlob:
createRecordSerial: 100 createRecords, one after another, as one person posting. No other write is there to share a sync with.firehoseLoaded: the firehose part's 20 subscribers and lag, from a write's answer to a subscriber having its commit, with 400 putRecords 16 at once. The writers are capped at the number of accounts, so that each goes to a different account.firehoseandfirehoseLoadedshare one function,fanOut.replay: 4 subscribers from cursor 0, each sent every event of the round and then a write made once all are connected. Throughput is the events sent to them per second, and each time is a subscriber's, from asking to having that commit. A part may now returncount, the events its rate is of.zds's adapter declares
firehoseLoadednot served, with why: in its warm-up (40 putRecords, 4 at once to 4 accounts) each of 20 subscribers was sent 34 to 37 commits, by zds's own log, though its seqs ran on by 40.bench/README.md, bench/RESULTS.md, bench/results.json. The parts described. RESULTS.md is a new run of all four servers, with its caveats brought to it. One of them is new: one write at a time is each server's sync alone,
F_FULLFSYNCfor spec-pds against plainfsyncfor the reference.Why
The last bench pull, at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/spec-pds/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3mzzk6c3wtdrj, measured the firehose's lag one write at a time. It left three things unmeasured: delivery under concurrent writes, where spec-pds sends an event only once every earlier one is on disk; replay, what a relay does after reconnecting; and a single write's cost, the one case where spec-pds pays its stronger sync alone. Leaving the last one out would have flattered spec-pds. Replay has 4 subscribers because zds and vlpds each serve 4 backfills at a time.
That pull's run began at a load average of 89, and its reference firehose lag (p50 78.5 ms) was that load. In this run, begun at ~12, the reference's single-write lag is 0.5 ms against spec-pds's 0.3. RESULTS.md says so.
How it was checked
node bench.mjs --rounds 3 --json ../bench/results.json, all four servers.--reportrenders the same tables. Best rounds:The benchmark is no gate.
Shortcomings