In this lesson, you will learn how to interpret Memory Pressure Stall Information (PSI) metrics to detect when your system’s processes are slowing down because they are waiting for memory.
Understanding Memory Stalls
In the past, Linux administrators often monitored "Free Memory" to guess if a system was under stress. However, modern kernels use available memory for caches, meaning a low free memory number is often normal. Memory Pressure Stall Information (PSI) changes the focus from how much memory is used to how long your processes are waiting for it.
When the kernel needs memory but can’t find enough quickly, it must perform tasks like swapping memory pages to disk or aggressively reclaiming cache. During these operations, your application processes are forced to pause. PSI tracks exactly how much time your tasks spend in these "waiting" states.
Reading the Metrics
You can view these statistics in /proc/pressure/memory. You will typically see two lines: some and full.
$ cat /proc/pressure/memory
some avg10=0.50 avg60=0.20 avg300=0.10 total=150000
full avg10=0.00 avg60=0.00 avg300=0.00 total=0
some: This represents the percentage of time that at least one process was delayed waiting for memory. If this number is high, your system is experiencing contention, and some tasks are being slowed down.full: This is more critical. It represents the percentage of time that all non-idle processes were blocked simultaneously waiting for memory. Iffullis greater than zero, your system has essentially reached a standstill, as there is no productive work happening while the kernel struggles to free memory.
Diagnosing the Bottleneck
If you see rising avg10 (10-second average) values in the some category, your processes are starting to fight for memory. If the full category starts showing values, your system is likely hitting "thrashing" territory—where the system spends more time moving data between RAM and disk than actually executing your application logic. By monitoring these files, you can identify if a performance degradation is caused by memory starvation or other resource issues like CPU contention or disk I/O.
Key Takeaway: PSI metrics allow you to see the real-world impact of memory scarcity by measuring how long your processes are actually blocked, rather than just looking at raw usage statistics.