Investigating Phantom Memory in Kubernetes
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Hatchet engineer Mohammed Nafees traced a false high-memory alert on a Go controller pod to kernel caches rather than the app. A reproduction that created and deleted temp files at over 100k per second showed 441.7 MiB of reclaimable slab (dentries, inodes) against 11.3 MiB of anonymous memory, yet kubectl top reported about 409 MiB. Kubernetes working set counts that slab. Dropping caches reportedly cleared it. His fix: alert on RSS against requests and working set against limits. These measurements come from a single reproduction.