Diagnose Linux memory pressure before it becomes an outage

8 steps · about 2 h 48 min · Intermediate

  1. Read reclaim and paging counters (reference, Linux man-pages, 18 min)

    Kernel counters reveal allocation, reclaim, paging and fault activity behind a memory alarm.

  2. Break host memory into kernel categories (reference, Linux man-pages, 22 min)

    Meminfo exposes reclaimable cache, swap, slab and commit signals behind the summary.

  3. 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.

  4. Compare process memory footprints (reference, Linux man-pages, 20 min)

    Per-process size and resident counters identify major consumers while keeping measurement caveats visible.

  5. 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.

  6. 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.

  7. Interpret memory stall pressure (reference, Linux kernel documentation, 22 min)

    Pressure-stall information measures time lost waiting for memory and supports alerts before exhaustion.

  8. 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.