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

The forge keeps its stall and minute memory lines in its data dir, so its performance history survives a release #17681

opened this

Merged 11h 53m ago, live in production

Every release replaces the forge's container, and its log with it: with releases every 30 minutes, the [loop] stall lines and the minute memory lines were lost each half hour, and a fix's before-baseline went with them.

Notes

opened this

Every release replaces the forge's container, and its log with it: with releases every 30 minutes, the [loop] stall lines and the minute memory lines were lost each half hour, and a fix's before-baseline went with them. Now the serving thread also appends them to <data>/perf/loop.log (perf/kept_log.ts), so a release keeps them:

  • what: every [loop] line, and the minute memory main: and memory holds: lines, as written to the log (kernel/log.ts teeLines; main.ts wires it at boot, read-only forges not);
  • cost: a line is a buffer push; the buffer is appended every 2 s or at 64 KiB, one append per flush, and the exit flushes it. Measured on the vxrail: 0.6-0.75 ms per 1,000 lines, flushes included;
  • bound: past 8 MiB the file rotates to loop.log.1…, five old files kept, 48 MiB at most;
  • read: bun scripts/perf-log.ts [data dir] [text], oldest first, across every boot kept.

Test: test/perf-kept-log.test.ts writes a stall and a memory line through createLog as the boot wires it, ends the process's log, opens the next boot's, and reads both back with the new line after them; a line nobody keeps is not kept; the files rotate within their bound. vxtest only.

Direction: the forge's performance history outlives a release, so the loop-stall work can be measured before and after (#17629) No door: a log file under the data dir, read with scripts/perf-log.ts No look: no page changes

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