Phantom memory spikes in Kubernetes controllers due to slab allocation

hatchet.run6 min read

An engineer investigating a sudden memory spike in a Kubernetes controller discovered that rapid temporary file creation was generating a massive amount of Linux kernel slab memory used for directory entries and inodes. Although the application itself was healthy and running with a small heap, Kubernetes' working set calculation counts this reclaimable slab memory, triggering false alarms and autoscaler scaling. The author outlines steps to verify this phantom memory issue using cgroup stats and drop_caches. Open article →