WIP: Count save flushes and test crash recovery #738

Closed
kayg wants to merge 1 commit from perf/one-flush-save into dev
Owner

A complete task save still performs three state flushes: the edit, the pending file image, and the completed placement. A warm API acknowledgement alone already performs one. This draft adds a Linux strace regression harness that distinguishes those paths and checks acknowledged edits after SIGKILL. It does not implement the requested full-save reduction.

perf/save-flushes.py uses the real HTTP API, reports state and Home flushes separately, and offers --gate-full-save to enforce the outstanding one-state-flush target. It checks task metadata before opening the note room after each crash, verifies every acknowledged append exactly once, checks idempotency replay, and counts durable edit receipts. Startup messages are suppressed to keep disposable setup credentials out of diagnostic logs. Data, state and output directories must be new and separate. Run instructions live in the script's docstring.

Formatting, Clippy with warnings denied, and workspace tests pass. The first workspace run lacked a JS dependency; installing the existing bun.lock resolved it without tracked dependency changes. Two runs of 501 SIGKILL cycles passed. This tests process crashes, not power failures.

The strict full-save gate fails. The existing 40 ms warm limit passes in every performance repetition, while some first-touch runs and every cold-index growth gate fail. Budgets and durability settings are unchanged. These measurements use the requested perf-test-03 paths, but /srv/homes is rotational XFS, not the ext4 Home required by ADR 0062. They are not an official ext4 gate. Before and after use identical binaries because the change is test-only; no speedup is claimed.

Phase Notes + tasks Repetition First-touch p95 ms Warm p95 ms Cold index growth
before 10k + 10k 1 15.51 9.70 35.6%
before 10k + 10k 2 18.18 6.50 32.5%
before 10k + 10k 3 13.70 6.57 33.6%
before 100k + 100k 1 50.05 9.31 30.0%
before 100k + 100k 2 64.48 8.24 32.0%
before 100k + 100k 3 45.79 11.19 30.7%
after 10k + 10k 1 37.35 10.78 30.9%
after 10k + 10k 2 44.21 11.02 28.0%
after 10k + 10k 3 44.07 7.74 32.1%
after 100k + 100k 1 41.75 9.19 44.6%
after 100k + 100k 2 38.26 9.63 30.7%
after 100k + 100k 3 69.87 12.49 24.9%

Raw counts, gate output, and remaining limitations are recorded on #686. The job names that issue, whose current title concerns CI migration; this PR contains no CI changes. No evidence or measurement artifacts are committed. No merge or deployment was performed.

A complete task save still performs three state flushes: the edit, the pending file image, and the completed placement. A warm API acknowledgement alone already performs one. This draft adds a Linux strace regression harness that distinguishes those paths and checks acknowledged edits after SIGKILL. It does not implement the requested full-save reduction. `perf/save-flushes.py` uses the real HTTP API, reports state and Home flushes separately, and offers `--gate-full-save` to enforce the outstanding one-state-flush target. It checks task metadata before opening the note room after each crash, verifies every acknowledged append exactly once, checks idempotency replay, and counts durable edit receipts. Startup messages are suppressed to keep disposable setup credentials out of diagnostic logs. Data, state and output directories must be new and separate. Run instructions live in the script's docstring. Formatting, Clippy with warnings denied, and workspace tests pass. The first workspace run lacked a JS dependency; installing the existing bun.lock resolved it without tracked dependency changes. Two runs of 501 SIGKILL cycles passed. This tests process crashes, not power failures. The strict full-save gate fails. The existing 40 ms warm limit passes in every performance repetition, while some first-touch runs and every cold-index growth gate fail. Budgets and durability settings are unchanged. These measurements use the requested perf-test-03 paths, but /srv/homes is rotational XFS, not the ext4 Home required by ADR 0062. They are not an official ext4 gate. Before and after use identical binaries because the change is test-only; no speedup is claimed. | Phase | Notes + tasks | Repetition | First-touch p95 ms | Warm p95 ms | Cold index growth | |---|---:|---:|---:|---:|---:| | before | 10k + 10k | 1 | 15.51 | 9.70 | 35.6% | | before | 10k + 10k | 2 | 18.18 | 6.50 | 32.5% | | before | 10k + 10k | 3 | 13.70 | 6.57 | 33.6% | | before | 100k + 100k | 1 | 50.05 | 9.31 | 30.0% | | before | 100k + 100k | 2 | 64.48 | 8.24 | 32.0% | | before | 100k + 100k | 3 | 45.79 | 11.19 | 30.7% | | after | 10k + 10k | 1 | 37.35 | 10.78 | 30.9% | | after | 10k + 10k | 2 | 44.21 | 11.02 | 28.0% | | after | 10k + 10k | 3 | 44.07 | 7.74 | 32.1% | | after | 100k + 100k | 1 | 41.75 | 9.19 | 44.6% | | after | 100k + 100k | 2 | 38.26 | 9.63 | 30.7% | | after | 100k + 100k | 3 | 69.87 | 12.49 | 24.9% | Raw counts, gate output, and remaining limitations are recorded on #686. The job names that issue, whose current title concerns CI migration; this PR contains no CI changes. No evidence or measurement artifacts are committed. No merge or deployment was performed.
test(perf): count save flushes and check crash recovery
Some checks failed
CI / server (pull_request) Successful in 1m7s
CI / rust (pull_request) Failing after 4m26s
CI / web (pull_request) Failing after 2h31m16s
ca723a3d0d
Author
Owner

Housekeeping #1009 status: audited head ca723a3d0db925735b98625363a83fdbf5f13477 against dev cd7f84432feb. git cherry origin/dev <head> reports 1 unmatched commits and 0 equivalent patches. Separate stable patch-id indexing and key-file checks do not establish full landing. Absent from dev: perf/save-flushes.py. Left unchanged as WIP, per kayg’s instruction; no rebase, close, tests, or merge. The #1009 audit records the unmatched commit list.

Housekeeping #1009 status: audited head `ca723a3d0db925735b98625363a83fdbf5f13477` against dev `cd7f84432feb`. `git cherry origin/dev <head>` reports 1 unmatched commits and 0 equivalent patches. Separate stable patch-id indexing and key-file checks do not establish full landing. Absent from dev: `perf/save-flushes.py`. Left unchanged as WIP, per kayg’s instruction; no rebase, close, tests, or merge. The #1009 audit records the unmatched commit list.
Author
Owner

Closed in the 14 Nov housekeeping. Its only file, perf/save-flushes.py, is not referenced anywhere on origin/dev (grep for save-flushes finds nothing), and it never implemented the reduction. Tip archived at refs/archive/stale-2026-11-14/perf/one-flush-save (ca723a3d0); revive it if #938's work wants a flush counter.

Closed in the 14 Nov housekeeping. Its only file, `perf/save-flushes.py`, is not referenced anywhere on `origin/dev` (grep for `save-flushes` finds nothing), and it never implemented the reduction. Tip archived at `refs/archive/stale-2026-11-14/perf/one-flush-save` (`ca723a3d0`); revive it if #938's work wants a flush counter.
kayg closed this pull request 2026-11-14 16:48:16 +00:00
Some checks failed
CI / server (pull_request) Successful in 1m7s
CI / rust (pull_request) Failing after 4m26s
CI / web (pull_request) Failing after 2h31m16s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!738
No description provided.