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

Benchmark: tranquil beside the others, on PostgreSQL

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:bench-tranquil

Adds Tranquil PDS (v0.8.0, on PostgreSQL, its default backend) to the benchmark, and a full three-round run of all five servers with it in bench/RESULTS.md. Only the benchmark changes: nothing the gates check.

Claude Opus 5.5 · high

What changes

Pin. bench/impls.json pins tranquil at v0.8.0 (ce17e8a), built by --setup from its own Dockerfile as monolith-bench-tranquil:ce17e8a (its published image needs a login to pull), and postgres:18.7-alpine by digest, as its database.

Adapter. harness/bench.mjs gains a tranquil adapter; its Docker configuration is in harness/lib/impls.mjs (tranquilEnv, tranquilOwnEnv, tranquilCreateArgs, startPostgres). Each round makes a fresh Docker network and a PostgreSQL container and volume, ready over TCP before the start clock, then tranquil on it, as its container docs run it. The bench's own changes are those a local benchmark needs, as for the others: rate limits and invites off, its PLC directory reachable (ALLOW_PRIVATE_FETCH), no relays (CRAWLERS=,), the email-verification gate off (otherwise no account can log in or write), and full getRepo exports at once raised from 4 to 8, as zds's are. PostgreSQL is reported beside it, as RustFS is beside vlpds.

Two things the bench measures differently.

  • Volume reader. tranquil's image is distroless, with no shell, so an adapter may now name a reader: an image with a shell, run with --volumes-from, to read the size of its volume.
  • PostgreSQL's memory. This is the sum of its processes' PSS, read as the postgres user, since root in the container may not read another user's smaps. Summing RSS counted the shared buffers once for every backend: 8.7 GiB peak, where PSS gives about 535 MiB.

Results. bench/RESULTS.md and bench/results.json are a fresh run of all five servers, three rounds each, with tranquil's pins, configuration and caveats. Each figure in the caveats is recomputed from this run. bench/README.md says how tranquil is run and measured, and that it has no backfill window to set to 10 s (whole hours, pruned once a minute at most).

Why

Tranquil is a widely run Rust PDS, a natural one to set beside the others. PostgreSQL rather than tranquil-store, its embedded store, because PostgreSQL is its default and what its docs deploy; the embedded store could be a second adapter.

How it was checked

  • One trial round of tranquil alone, then the full just bench (setup, then 3 rounds of every server). tranquil served every part, route and section.
  • node bench.mjs --report ../bench/results.json prints exactly the tables in RESULTS.md.
  • The results were run at 42abe3c, before main renamed the project to Monolith. They are renamed here as main renamed the last results: spec-pds becomes monolith in the keys and image tags.

Shortcomings

  • Load. The run started at a 1-minute load average of 3.7, but other work on the machine rose to 6 to 29 during the rounds (RESULTS.md, "Caveats"). That is lighter than the run it replaces (5 to 89), but not idle.
  • Monolith's numbers are of 42abe3c. That is before 08a1db4, which changed pds-server on main.
  • tranquil-store not run. tranquil ran only on PostgreSQL; its embedded store was not measured.
Approved

This adds a tranquil adapter (PostgreSQL 18.7 beside it) to the benchmark, with its pins, README text and a fresh five-server run. I found nothing that must change.

  • Scope. The change touches only bench/, harness/ and one line of compat/README.md. Nothing here changes server behaviour, so spec/ and the server code are unaffected.
  • Checks. No existing check is loosened. --setup builds the tranquil image generically from the impls.json pin, so no extra setup code is needed.
  • Adapter. The environment changes are the same kind of local-benchmark switches the other adapters get: rate limits and invites off, ALLOW_PRIVATE_FETCH, no crawlers, and the email gate off. They are stated in the README and in info().
  • Measurement. The reader image for the shell-less container and the PSS-based PostgreSQL memory are explained and reported in their own tables. The README documents why noWindow applies, so the storage table's default-retention row is labelled.
  • Not read. I did not read bench/RESULTS.md or bench/results.json line by line, since they are generated output. The PR says --report reproduces the tables, and I could not rerun it here.
Merged as 4409a5c