Kubernetes tells you memory is high. KubeMemLens splits each Pod's charge into anonymous memory, file cache, shmem and residual, and shows the cgroup evidence behind it.
The CLI ships with five cgroup v2 samples. Pick one to see the breakdown and the diagnosis it prints, with the same figures.
4.10 GiB charged to the Pod
Diagnosis
cache-heavy
Confidence
medium
Anonymous (anon)
1.20 GiB 29.3%
File cache
2.51 GiB 61.3%
Shmem / tmpfs
90.00 MiB 2.1%
Residual / other
307.20 MiB 7.3%
Filesystem-backed cache, excluding shmem, is 61% of total charged memory. This does not look like a pure application heap leak. File cache is high and active.
$ kubectl memlens sample explain cache-heavy
2.40 GiB charged to the Pod
Diagnosis
rss-heavy
Confidence
medium
Anonymous (anon)
2.00 GiB 83.3%
File cache
180.00 MiB 7.3%
Shmem / tmpfs
40.00 MiB 1.6%
Residual / other
189.60 MiB 7.7%
Anonymous memory is 83% of total charged memory. This suggests application heap, runtime heap growth or retained allocations. Use runtime heap tooling first.
$ kubectl memlens sample explain rss-heavy
3.00 GiB charged to the Pod
Diagnosis
tmpfs-heavy
Confidence
medium
Anonymous (anon)
900.00 MiB 29.3%
File cache
0 B 0%
Shmem / tmpfs
1.60 GiB 53.3%
Residual / other
533.60 MiB 17.4%
Shmem / tmpfs is 53% of total charged memory. Memory-backed files such as tmpfs, /dev/shm or memory-backed emptyDir volumes are a major part of the charge.
$ kubectl memlens sample explain tmpfs-heavy
2.20 GiB charged to the Pod
Diagnosis
dirty-writeback-heavy
Confidence
medium
Anonymous (anon)
800.00 MiB 35.5%
File cache
974.00 MiB 43.2%
Shmem / tmpfs
50.00 MiB 2.2%
Residual / other
428.80 MiB 19%
Dirty and writeback pages are 18% of total charged memory. This suggests a write-heavy workload, slow writeback or storage pressure. Check the write path first.
$ kubectl memlens sample explain dirty-heavy
900.00 MiB charged to the Pod
Diagnosis
normal
Confidence
low
Anonymous (anon)
500.00 MiB 55.6%
File cache
230.00 MiB 25.6%
Shmem / tmpfs
20.00 MiB 2.2%
Residual / other
150.00 MiB 16.7%
No dominant cgroup memory bucket was detected. One snapshot found no dominant signal. Absence of evidence is not evidence of healthy history.
$ kubectl memlens sample explain normal
Built into the CLI from v1.0.3.
Real cgroup v2 fixtures from the repository.
Figures exactly as the command prints them.
memory.stat
cache-heavy sample
memory.current 4,402,341,478 bytes
anon1,288,490,189
file2,791,728,742
shmem94,371,840
kernel188,743,680
active_file2,362,232,013
inactive_file398,458,880
file_dirty4,194,304
Diagnosis cache-heavy · confidence medium
Straight from the cgroup.
Every figure comes from the Pod's own memory.stat and memory.current. 61% of this Pod is file cache, so it does not look like a heap leak.
Read-only. It never changes your workloads.
Evidence and caveats beside every diagnosis.
OOM, memory.high, memory.max and PSI signals from the current sample.
Confidence stays honest: one snapshot is a heuristic.
Three commands. All read-only.
~/incident
# Find the Pods with the strongest memory signals$ kubectl memlens top pods -A --sort-by cache# Explain one: composition, limits, pressure, evidence$ kubectl memlens explain pod api-123 -n production# Keep a redacted incident capture$ kubectl memlens capture -n production --pod api-123 --include-history -o incident.json$
Find. Bring the Pods with the strongest memory signals to the top.
Explain. Inspect composition, limits, pressure and the evidence behind the diagnosis.
Preserve. Write a redacted incident capture that you can review and compare.
Stay in the terminal from signal to evidence. KubeMemLens reports evidence and caveats; it never changes your workloads.
The video has no audio. Its on-screen walkthrough shows:
Select demo-assets-cache in the main dashboard and press Enter.
Inspect its composition: 84% file cache and 14% anonymous memory.
Move between panels with Tab and open suggested checks. These are hints; nothing runs automatically.
Press Esc to return to the same selected Pod, then open demo-upload-buffer.
Compare the similar totals: about 76 MiB and 75 MiB. The second Pod is 85% shared memory / tmpfs.
Tested on AWS EKS.
Memory inspection, capture and replay, access isolation, recovery and cleanup were exercised on AWS EKS. Use KubeMemLens in your workflow and tell us what you find.
v1.0.6 reads each Pod's own cgroup, so a Pod's limit is the one the kernel enforces. It names the container closest to its own limit, and default incident captures now alias every name. Some output changed, so read the release notes before you upgrade.