Skip to content

ADR-0005 — Acceptance bars for speed, disk and memory

  • Status: Accepted (two rows later amended: the concurrency row by ADR-0035, the large-thread put row's pool by ADR-0030)
  • Date: 2026-11-12
  • Supersedes: none
  • Authors: project maintainers

Context

The project's test for anything it builds is a measurable and valuable improvement over upstream's langgraph-checkpoint-postgres. Every benchmark compares four arms — upstream, upstream on a DeltaChannel graph, ours on the plain graph, ours on the DeltaChannel graph — on both speed and disk (the benchmark rule). A rule about what is recorded still needs a line that says what counts as good enough.

The bars were set from pre-release baselines of both upstream arms (measured). The patch-storage bar of at least 3× fewer bytes than compressed full copies with put within 1.25× came from choosing the storage approach (design/README.md).

Decision

We will judge the saver against these bars. They are targets, not results, so as numbers they are claimed; the upstream figures they were set from are measured:

Workload Disk put p50 Memory
400-step plain graph at least 3× smaller than upstream within 1.25× of upstream —
400-step DeltaChannel graph no larger than 1.05× upstream with DeltaChannel within 1.10× —
Concurrent threads on one saver (pool of 8) — at K=8 within 3× of our own K=1 p50; at K=32 at most 0.5× upstream's p50; turns/s at least upstream's from K=8 up —
1–10 MB message threads plain graph at least 3× smaller than upstream at 1 MB and 8× at 10 MB; DeltaChannel graph no larger than 1.05× upstream with DeltaChannel within 1.25× of upstream —
50 threads of ~1 MB on one saver — — RSS growth at most 2× the configured cache bound plus upstream's own growth

Disk bars are judged on bytes above each arm's empty schema (every table and index after setup and VACUUM, before a write), with raw bytes reported beside them. Every arm shares 8 pool connections, so above K=8 a put also waits for a connection; the concurrency bars are read with that in mind.

Alternatives considered

  • Bars relative to bare upstream only — rejected: compression alone already beats upstream on disk, so patches must beat compressed copies, not the uncompressed baseline.
  • No bars, only reporting — rejected: a result with no line to cross cannot fail.

Consequences

  • A miss is reported as a miss, next to the bar, and either fixed or explained; it is never folded into a pass.
  • Two rows changed after profiling: ADR-0035 replaces the K=8 bar and ADR-0030 fixes which pool the large-thread put bar uses.
  • The current bars live in the benchmark rule.

References