Free — no signup required

Interpreting Memory Pressure

2 min read

The Cost of Reclaiming

Memory pressure is not just about Out of Memory (OOM) crashes. It's about the invisible tax the kernel pays to prevent crashes — and the application time lost while that tax is being collected.

When a process requests memory and the system is running low, the kernel doesn't immediately crash. Instead, it performs direct reclaim: it pauses the requesting process, scans its Least Recently Used (LRU) page lists, finds pages that can be evicted (file cache pages that can be re-read from disk, or anonymous pages that can be written to swap), evicts them, and then resumes the process with the newly freed memory. The duration of that pause is measured as memory pressure.

A system with /proc/pressure/memory showing some avg10 around 35% and full avg10 around 12% is in serious trouble: for 35% of the last 10 seconds, at least one task was stalled waiting for memory, and for 12% of that time, every task was stalled simultaneously. The application is spending more time waiting for the kernel to shuffle memory around than it is doing actual work.

The full line as an OOM predictor: Rising full memory pressure is one of the most reliable early warning signs of an impending OOM kill. The sequence is: low memory → direct reclaim → some pressure rises → reclaim can't keep up → swap thrashing → full pressure rises → OOM killer activates. Tools like systemd-oomd (the out-of-memory daemon) monitor PSI thresholds and proactively kill the least-important cgroup before the system locks up completely, using full memory pressure as its primary trigger signal.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free