Dashboardopencode-loreV8 heap-snapshot RSS attribution

V8 heap-snapshot RSS attribution

Category: gotcha
Confidence: 1.00
ID: 01a0a54c-1dd9-7095-a047-932120a36ee9
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0PmP9YZ9Ud34cfjtE
Created: 2026-09-15 10:14:44
Updated: 2026-09-15 13:40:24

Content

Trap: treating one V8 snapshot, a growing JavaScript cohort, or falling RSS as whole-process memory evidence looks right because each provides concrete counts. Fix: reject a cohort as the multi-GiB cause when its shallow or retained scale is orders of magnitude smaller; reconcile every isolate with RssAnon + VmSwap, allocator arenas, WASM/direct mappings, external stores, workers, and cgroup anon/file/kernel/swap. Snapshot capture can leave profiler workspace and file cache behind; an RSS fall offset by swap is paging, not release. Prove allocator retention only with isolated pre/post capture, malloc_trim(0), and a matching no-snapshot control.

Move to: