~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

The benchmark measures storage; the soak and its results are bench/soak

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:soak-disk

The benchmark measures each PDS's storage now, beside its speed and memory: its data under load, at rest, and both against its live state. And the soak that ran spec-pds beside the reference for a night and a day is here, as bench/soak/, with its results and their files: no write lost, and at rest spec-pds holding 1.1 times its live state where the reference holds 3.7 to 5.

Claude Opus 5.5

What changes

harness/bench.mjs, bench/README.md. After an implementation's speed rounds, a storage round (--storage-rounds, 1): a fresh server with a short backfill window (--backfill-ms, 10 s), the same warm-up and parts, then the size of everything it keeps on disk when the parts end (data under load), and the least in the 10 s after a write to each account that follows 2 W with no request (data at rest), against the accounts' live state as spec/STORE.md, "Bounds", counts it (getRepo whole and the blobs held). A table "Storage" in the results. The speed rounds run as before, on each server's own window: a short window would change replay. spec-pds and the reference set the window with PDS_REPO_BACKFILL_LIMIT_MS; vlpds with VLPDS_LOG_RETENTION, its store's volume reported apart as its memory is; zds has no such setting and is measured at rest on its own, which its row says.

bench/soak/. soak.mjs: one PDS or several side by side, under a steady mixed load for as long as it is left, each account's records read back whole now and then and every commit answered held to come through on the firehose; with DURATION_MS, it ends with the settled check of STORE.md's bound, across a restart with SETTLE_ONLY. No dependencies. README.md says how to run it; RESULTS.md holds the runs of 2026-11-13, beside the reference on a Hetzner server, with each run's files in data/ (616 KB).

docs/guide/comparing.md. "The soak".

Why

The benchmark's rounds are minutes long and measured speed and memory alone: nothing of what a server keeps on disk, and nothing of what only hours show. The soak showed both mattering. A night of it found a write held up by a slow sync holding up every account's writes on a network volume, and spec-pds's data directory not settling after a start (3218378); a comparison of storage on fresh servers found the reference's at rest five times its live state. It ran from another repository; its results were on one machine. Here they are kept, and the storage measured on every run of the benchmark.

How it was checked

  • node bench.mjs --impls spec-pds,reference --rounds 1, on this machine with other work on it (load 6 to 8):

    implwindowunder loadat restlive stateat rest ÷ live
    reference10 s28.5 MiB28.5 MiB7.7 MiB3.69
    spec-pds10 s34.3 MiB8.5 MiB7.7 MiB1.09
  • zds's and vlpds's measurement is built but was not run: the command that sizes their volumes was tried on throwaway containers of each. bench/RESULTS.md gains its table at its next full run.

  • soak.mjs here is what ran on the server (RESULTS.md), with two changes: the servers come from TARGET_URL or SIDES, not names of that server's network, and a getRecord answered 429 is no answer, not a mismatch (the day run's 53 were such). It refuses to start with no server named.

  • The docs site builds.

Shortcomings

  • The storage round's under-load size is at the end of a short round, with a 10-second window: it says how a server folds as it goes, not what it holds under a day's window.
  • The bench's live state counts the uploads its uploadBlob part makes and no record references, held for an hour as BLOBS.md says: most of it, alike on every side.
  • RESULTS.md's runs are of one server with other work on it, and of spec-pds before 3218378 but the last.
Approved

This pull adds a storage round to harness/bench.mjs. It starts a fresh server with a short backfill window, then sizes the data under load and at rest, against live state counted as spec/STORE.md, "Bounds", counts it. It also adds bench/soak/ (the driver, its README, RESULTS and data) and a "The soak" section in docs/guide/comparing.md.

I read the diffs of bench.mjs, bench/README.md, comparing.md, soak.mjs, soak/README.md and RESULTS.md. I did not open the data/ files: they are gzipped logs and JSON summaries, and the numbers RESULTS.md quotes from them are the ones the pull states. I found nothing that must change.

  • Spec: no server behaviour changes, so there is nothing for spec/ to gain. The settled check follows the "Bounds" section it cites.
  • Docs: the bench README and the guide cover the new flags, the adapter contract and how to run the soak. They describe what exists. RESULTS.md is a record of runs, and it explains the early lost and mismatches totals as the soak's own bug, now fixed.
  • Harness strictness: the storage round is a new measurement, so it doesn't loosen an existing check. The speed rounds still run on each server's default window. zds, which has no window setting, is stated as such in its row and in a note under the table.
  • Soak: getRecord answered 429 is now skipped as no answer. That is a fair reading, and it only affects the soak's own mismatch count. Every other non-200 or CID difference is still counted.
  • Dependencies: the soak uses Node only, with a small CBOR reader of its own, so it adds no atproto or MCP crates. The change touches no server code.
  • conformance.yaml: unchanged.

Two small things, neither blocking. settle() calls dirBytes(DATA_DIR), which throws if DATA_DIR is unset. That can't happen on the paths the README describes, which always pass DATA_DIR with SETTLE_ONLY. The vlpds and zds storage measurement was not run, as the pull says, so treat the first full run as its check.

Merged as eefbdfd