writeonce/docs/examples
shoney.arickathil 40d56c4664 perf(wal): checkpoint measured — 2.16x space, 1.78x boot, 2.7ms pause — T5
databasev2 3, task 5.

Full campaign, same workload twice, differing only in whether
checkpointing may fire:

- WAL used 1962358 -> 907094 bytes (2.16x reclaimed)
- boot 114 -> 64 ms (1.78x), median of 3
- stop-the-world pause max 2651us against a STATED 50ms budget

The budget is asserted, not assumed: 50ms is a stall a serving process
can absorb without a client seeing a timeout, and the leg fails if it is
exceeded. The pause is O(live rows) — at ~181 MB/s a 1GB live set implies
~5.5s, which is the number an incremental design must be bought against.
The spec deliberately did not buy it in advance.

FOUND BY MEASURING: the dump was 8x slower than it needed to be. It
flushed through wo_wal_commit, which fdatasyncs, so it paid one barrier
per 256 records. Intermediate durability there is worthless — the temp is
not authoritative until the rename and is fsynced once immediately before
it. With a single final barrier:

- ~107KB live: 23948us -> 2903us
- ~500KB live: 36361us -> 7526us
- ~1.98MB live: 107649us -> 13212us
- marginal ~22 MB/s -> ~181 MB/s, sync-bound to bandwidth-bound

Correctness re-proven after that change: wovm-test 36 suites 0 fail,
test_wal 760 pass including the 40-round kill-during-compaction battery.

Two measurement defects of my own, fixed rather than reported:

- boot measured through the driver's run() helper reported 251ms both
  with and without checkpointing — run() samples RSS on a 250ms poll, so
  every timing floors at the quantum. Measured directly instead, median
  of 3
- ckpt.reclaim_x was recorded as lower-is-better by the default detector,
  which would have PASSED "reclaimed nothing" and FAILED an improvement:
  the feature's central claim, gated backwards. Now higher-is-better,
  gated at 15% while the wall-clock metrics stay wide — waiving them all
  would have left the leg ungated, part A's task 4 mistake

- sample gains a `boot` mode that does nothing, so boot time is boot time
- walstats now reports compactions, pause max/total and compacted bytes
- baseline refreshed from the FULL campaign (N=20000, crash_reps=3), and
  a fresh full run passes 116 checks 0 failures
- gate bites: reclaim_x doctored to 1.0 -> FAIL on exactly that metric

One flake seen and checked, not papered over: durable.sN.query.ops_sec
failed once at 53% below baseline. It is a read-only metric that touches
no WAL code, and a re-run passed 116/0 with the box at load 1.85.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-29 06:20:13 +02:00
..
chat docs(24): T10 closeout — stories done, board, graph, ledger, CODE-LOGIC 2026-08-28 00:06:31 +02:00
db-actor docs(24): T10 closeout — stories done, board, graph, ledger, CODE-LOGIC 2026-08-28 00:06:31 +02:00
db-bench perf(wal): checkpoint measured — 2.16x space, 1.78x boot, 2.7ms pause — T5 2026-08-29 06:20:13 +02:00
employee docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
employee-list docs(databasev2): third track — the database beyond RAM, with per-table storage modes 2026-08-26 20:52:48 +02:00
fibers feat(lang+wo-html): raw text literals, component layer, MVC samples 2026-08-25 03:58:41 +02:00
gc-cycle docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
log-watcher docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
operators feat: iteration 36 task 5 — operators sample, docs closeout 2026-08-22 21:42:08 +02:00
porch docs(24): T10 closeout — stories done, board, graph, ledger, CODE-LOGIC 2026-08-28 00:06:31 +02:00
shop refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00
site refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00
web-app refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00
writeonce-view feat(serve+view): file serving, downloads, supported systems; rename 2026-08-25 04:41:00 +02:00