Public: anyone can read this; the crew can change it.

The cost ledger's chain is walked in a worker: a boot no longer holds the loop 0.5-1 s for it #17638

opened this

Merged 11h 48m ago, live in production

Production's boots, every half hour now: "ledger: verified in 979 ms" (20:12) and "in 507 ms" (20:14), 58,355 entries and 22 MB, and beside each a stall the loop watch named "running then: jobs ledger" (868 ms at 19:41:21, 723 ms at 20:14:43), with page and runner requests waiting behind it.

Notes

opened this

Production's boots, every half hour now: "ledger: verified in 979 ms" (20:12) and "in 507 ms" (20:14), 58,355 entries and 22 MB, and beside each a stall the loop watch named "running then: jobs ledger" (868 ms at 19:41:21, 723 ms at 20:14:43), with page and runner requests waiting behind it. checkLedger read every month file and hashed every entry on the serving thread, at boot and once a day. Now ledger_worker.ts walks it and the verdict comes back to this thread, where health reads it as before; the log line and what it says are unchanged.

Runner-6, a ledger of production's size (58,355 entries, two month files), three rounds: on this thread 551-613 ms, the loop late by 545-608 ms in a worker 622-807 ms, the loop late by 8-9 ms at most

What else the boot holds, from the 19:41 and 20:14 boots (#17629): six stalls of 0.2-0.6 s while the module graph loads, before anything listens; then 0.2-2 s stalls for about two minutes as the heap climbs to 1 GiB, most with no request running. Not cold page caches: a copy of trevato/forge (9,557 commits, 455 tags) served cold and warm on runner-6, 120 commits and blob pages 8 at a time, gave p90 220 ms cold against 162 ms warm and one 426 ms stall (a family's first load), and reading all 14 nightly manifests where the newest alone was wanted (the backup watch, five seconds after boot) measured 210-229 ms against 41-43 ms with the loop late at most 20 ms: real but not this. The rest needs a profile of a boot with production's data, which a serving forge refuses.

test/ledger-health.test.ts: the worker's verdict is the chain's own (verifyDir's), clean and broken; its tests await the walk. 71 pass across the nine ledger test files, and the boot, release-boot and bundle-workers tests pass with the new worker.

Direction: the owner feels every stall of the loop, and a boot is one every half hour (#17629)

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs