chadtmiller.com/monolith
An atproto PDS
A reproducible benchmark beside other PDSes: the reference, vlpds and zds
MergedThis adds harness/bench.mjs, bench/RESULTS.md with bench/results.json, and a README paragraph. It is a standalone tool: it changes no server behaviour, no spec/ file, no crates/ code and no harness/conformance.yaml entry. The README paragraph says what exists and how to run it, with no history. The caveats in the results (fsync differences, a loaded machine, a single client) are stated plainly and the inferences are marked as inferences.
I could not run it, so the numbers are unchecked. The code reads correctly. Each round gets a fresh PLC directory, data directory and server. The warm-up and the measured run use separate accounts. Failed responses stop the run instead of being counted.
One thing to fix later, not a blocker. The "unsupported part is skipped and reported" path breaks parts that depend on others. If an adapter marks createRecord unsupported, st.records stays empty and getRecord fails on an undefined record. An adapter's unsupported map would need to skip the dependent parts as well, or the reason would need to say so.
harness/bench.mjsline 302Outdated
const warm = { tag: 'warm', accounts: [], records: [] } | |
const st = { tag: 'bench', accounts: [], records: [] } | |
for (const [part, [n, at, fn]] of Object.entries(PARTS)) { | |
if (adapter.unsupported[part]) continue |
Skipping an unsupported part leaves later parts that read its state (getRecord needs createRecord's records, everything needs createAccount's accounts) with nothing to read. Skip those too, or report them as depending on the unsupported part.
Carried forward: the change this pull makes at ada83895dd5fbdd4e27d81eab82e014ee5fd7bc2 is the one reviewed at 32319e0944ed4043fd76373488b57424798da201, so that review stands. What is new comes from its base.
Updated to d14e151: main merged in (the TCP_NODELAY fix, whose absence ejected the last run), and vlpds added: its release image and RustFS pinned by digest in bench/impls.json, node bench.mjs --setup, bench/README.md, and three-way results from a clean state. The body describes all of it.
This round adds vlpds, run as its release image with a RustFS S3 store, both pinned by digest in bench/impls.json. It also adds a --setup command, a --report command, bench/README.md, a just bench recipe and the new @aws-sdk/client-s3 dependency. It changes no server behaviour, nothing in spec/ or crates/, and no conformance.yaml entry. The root README paragraph says what exists and how to run it, with no history. I read every changed file except bench/results.json, which is raw output. I could not run anything, so the numbers are unverified.
What I read looks correct:
- Each round gets its own PLC directory, data directory, port, and vlpds network, volume and containers. Failures stop the run, and a failed round keeps its log.
- Memory sampling is clearly separated, so RustFS's memory is not counted as vlpds's.
- The caveats are plain and the inferences are marked as inferences. The main ones are durability that differs per server, vlpds running in a VM, a loaded machine and a single client.
Two small things, neither blocking:
- Unsupported parts: my earlier note still applies, since every adapter has
unsupported: {}. An adapter that skipscreateRecordwould also breakgetRecord, which readsst.records. The "Adding an implementation" section could say so, or the runner could skip dependent parts. bench/RESULTS.mdwording: the "Not run" section says other implementations "were dropped by the user's change of scope", which is history rather than a statement of what was measured. The pin line "branchbench-vlpds" has the same problem. Stating just what was run would read better.
This round adds zds as a fourth implementation. It is pinned in bench/impls.json at v0.7.8, commit cef2c63, and built natively by --setup from its own Dockerfile into the gitignored bench/vendor/. It also adds a zds adapter in harness/bench.mjs. I read the impls.json pin and the zds adapter. I did not read the rest of the round's diff line by line. That covers the rest of bench.mjs, bench/README.md and bench/results.json. I could not run anything, so the numbers are unverified.
The change touches no spec/, crates/ or conformance.yaml, and adds no crates. The harness change adds a benchmark; it does not loosen any check. The adapter is sound as far as I read it:
- Setup: each round gets a fresh JWT secret, admin token and rotation key.
- Container lifecycle: the container is created before the start clock and removed in
teardown. - Stopping: the adapter kills the container because zds has no SIGTERM handler.
- Config: the one non-default setting (
ZDS_MAX_CONCURRENT_REPO_EXPORTS=8) is documented, with its reason. - Durability: the SQLite WAL and
synchronous=FULLclaim is marked as inferred, and the blobs-never-synced caveat is stated.
Two small items from earlier rounds remain; neither blocks:
- History in
bench/RESULTS.md: lines 236–237 still say other implementations "were dropped by the user's change of scope". That is history, not a statement of what was measured. Thebench-vlpdsbranch pin I flagged last round no longer appears in the repository. - Unsupported parts: every adapter, zds included, has
unsupported: {}, so the dependent-parts note from my first review is still open. An adapter that skippedcreateRecordwould also breakgetRecord.
A benchmark of the server beside other PDS implementations on one machine, reproducible from the repository: the reference
@atproto/pds, spec-pds, vlpds and zds.harness/bench.mjs:perf.mjs's, plusapplyWritesandlistRecords. Each part reports throughput, p50 and p99; each server reports its start time and memory (idle and peak RSS).bench.mjs. A part a server can't serve is reported with the reason.node bench.mjs --reportrenders the tables again from a saved run.It is a tool, not a gate: no check of
spec/depends on it, and the gates don't run it.Reproducible:
bench/impls.jsonpins every implementation:@atproto/pds0.5.55, throughharness/package-lock.json;vlpds-bucket-probe;cef2c63, built natively from its own Dockerfile into a gitignoredbench/vendor/.node bench.mjs --setuppulls and builds them, idempotently, with a clear error for a missing prerequisite.node bench.mjs --rounds 3runs everything.bench/README.md: prerequisites, the commands, what each part measures, how to add an implementation, and the fairness rules.bench/RESULTS.md: the first results, on an M1 Pro, best of three rounds:createAccount/screateRecord/sapplyWrites/sgetRecord/slistRecords/sgetRepo/suploadBlob/svlpds's RustFS is counted apart: 175 MiB idle.
The caveats, all in the results file:
F_FULLFSYNC).fsyncon macOS and never syncs blobs.synchronous=FULL; its blobs are never synced.createAccountruns one at a time, behind its store lock as far as the timings show.The README says how to run it.
🤖 Generated with Claude Code