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

The memory line says what is held: RSS and its anonymous part, and the allocator's churn as a rate, never "committed 126 GiB" #17667

opened this

Merged 12h 21m ago, live in production

The minute line printed process mimalloc committed 126739 MiB (peak 126739 MiB) 22 minutes after production's 20:14 boot, while the process had VmSize 22 GiB, VmData 12.4 GiB and RSS 1.8 GiB (anonymous 1.7 GiB).

Notes

opened this

The minute line printed process mimalloc committed 126739 MiB (peak 126739 MiB) 22 minutes after production's 20:14 boot, while the process had VmSize 22 GiB, VmData 12.4 GiB and RSS 1.8 GiB (anonymous 1.7 GiB). Bun's jsc.memoryUsage().currentCommit only grows on Linux (peak always equal to it, about 5 GiB a minute), so it is what mimalloc committed since the process began: churn, not memory. A wear figure that reads as a 126 GiB leak is wrong.

Now: memory main: rss 1844 MiB (anonymous 1662 MiB), heap 539 MiB, allocator churn 5120 MiB a minute, database caches up to 1536 MiB, up 22 min. Anonymous RSS is the kernel's own RssAnon (/proc/self/status; left out where there is none); churn is the total's change since the last minute (none on the first, nor across a reset). A memory-growth finding quotes memory anonymous rss (process): first hour, trip, now where it quoted the commit. The total is kept on the reading as committedSoFar, read only as a rate.

On runner-6, against the kernel's figures: the line said rss 91.7 MiB (anonymous 67.9 MiB) where /proc/self/status said VmRSS 98,856 kB and RssAnon 69,580 kB, a second apart, after 800 MiB of 4 MiB buffers turned over.

test/memory-watch.test.ts: the line with and without anonymous RSS and churn, the total never said as a size, the rate (first reading and a reset give none), RssAnon read from the kernel's line and absent where it is not; sentinel-memory-evidence quotes the anonymous RSS. docs/features/ memory-growth.md says the same. 91 pass across the memory test files. Try: the preview's /system log a minute after it boots: the memory main: line names rss, anonymous and churn a minute

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