Diagnose Linux memory pressure before it becomes an outage
8 steps · about 2 h 48 min · Intermediate
- Read reclaim and paging counters (reference, Linux man-pages, 18 min)
Kernel counters reveal allocation, reclaim, paging and fault activity behind a memory alarm.
- Break host memory into kernel categories (reference, Linux man-pages, 22 min)
Meminfo exposes reclaimable cache, swap, slab and commit signals behind the summary.
- Watch reclaim swap and runnable work over time (reference, Linux man-pages, 20 min)
Repeated samples reveal sustained pressure and churn that a single snapshot hides.
- Compare process memory footprints (reference, Linux man-pages, 20 min)
Per-process size and resident counters identify major consumers while keeping measurement caveats visible.
- Inspect one process's memory and limits (reference, Linux man-pages, 18 min)
Per-process status connects resident, anonymous, swap and capability information to a suspected workload.
- Locate pressure inside cgroup boundaries (reference, Linux kernel documentation, 28 min)
Modern services may hit a cgroup memory limit even when the whole host still appears healthy.
- Interpret memory stall pressure (reference, Linux kernel documentation, 22 min)
Pressure-stall information measures time lost waiting for memory and supports alerts before exhaustion.
- Confirm and explain an OOM kill (reference, Linux kernel documentation, 20 min)
Kernel OOM behaviour and logs distinguish global exhaustion from a constrained workload and guide the mitigation.