Linux Pressure Stall Information
Linux Pressure Stall Information (PSI) measures how much time tasks spend waiting for a resource. It reports contention for CPU, memory, and I/O as time lost by work that could not make progress.
That is different from utilization. CPU utilization tells you how busy processors were; PSI tells you whether tasks were delayed because processors were unavailable. A machine can have low disk utilization while requests wait behind memory reclaim, or high CPU utilization with a large runnable queue. PSI makes those delays visible.
The problem PSI solves
Before PSI, operators commonly inferred contention from metrics such as CPU percentage, free memory, disk throughput, load average, and application latency. Those measurements are useful but incomplete:
- A four-core machine at 25% CPU utilization can still leave one busy thread and several latency-sensitive threads waiting.
- Storage may be far below its maximum throughput while individual requests wait for a slow operation.
- Plenty of free memory does not guarantee that a task will avoid a reclaim or swap-in stall.
- Load average counts some waiting tasks, but does not say whether they are waiting for CPU, memory, or I/O, nor how much wall-clock time the waits consume.
PSI connects the resource problem to the work being delayed. This is especially useful for services whose response time worsens before a device reaches a utilization limit.
What “pressure” means
PSI counts stall time: time during which a task is unable to make progress because it is waiting for a scarce resource. It reports two views of that time:
somemeans that at least one non-idle task was stalled.fullmeans that all non-idle tasks being tracked were stalled at the same time.
“Non-idle” matters. A process that is sleeping because it has no work is not evidence of pressure. PSI is interested in tasks that have work to do but cannot proceed.
For example, suppose ten tasks are active and two are waiting for I/O while the other eight run. That interval contributes to some, but not full. If all ten become stalled together, it contributes to both. full therefore indicates a more severe condition: the group has temporarily lost all useful progress.
The kernel accounts for overlapping stalls rather than adding each task's wait independently. If five tasks are stalled during the same millisecond, that is still one millisecond of wall-clock pressure for some, not five milliseconds. Otherwise a large number of blocked tasks would make the measurement grow merely because of concurrency.
How Linux accounts for CPU pressure
A task is under CPU pressure when it is runnable—it has work ready—but the scheduler has not given it a processor. The kernel observes task enqueue and dequeue events in the scheduler and tracks when runnable work is waiting behind work that is currently running.
This captures contention that CPU utilization alone cannot describe. If all eight cores are busy and twelve more tasks are runnable, utilization may simply read 100%; CPU PSI shows that work is queued and losing time. A high cpu some value means runnable work was waiting for processors for a substantial part of the interval.
CPU full has a special interpretation. At the whole-system level it is generally not useful or available in the same way, because the scheduler can normally run at least one task somewhere. At a cgroup level—where a container or service has its own accounting boundary—CPU full can show that every non-idle task in that group was waiting for its CPU allocation. That is a strong signal of throttling or insufficient CPU shares.
How Linux accounts for memory pressure
Memory pressure is not simply “RAM is nearly full.” Linux can use most memory productively as a file cache, and a system may have little free memory without any task being delayed.
PSI memory stall begins when a task is held up by memory-management work such as reclaiming pages, waiting for a page to be brought in from swap, or performing other operations needed to satisfy memory demand. The kernel records these stalls as tasks enter and leave the relevant memory-management paths.
A memory PSI increase therefore says: tasks that wanted to run were delayed by obtaining or managing memory. It can reveal a problem before an out-of-memory kill occurs. A workload that repeatedly faults pages back from swap may show substantial memory some pressure even when CPU utilization and disk throughput look moderate.
Not every allocation or page fault is a stall. Fast operations that complete without blocking do not meaningfully add pressure. PSI measures delay, not the number of memory operations.
How Linux accounts for I/O pressure
I/O pressure covers tasks blocked while waiting for I/O to complete, such as reads from storage. The kernel marks the task as stalled when it enters the relevant wait and ends the stall when the task can continue.
This distinction is important for storage diagnosis. A device can have low average throughput but still produce high I/O PSI if requests are small, serialized, or experiencing high latency. Conversely, a device doing large sequential transfers may report high utilization without causing much task delay if applications have enough queued or independent work.
I/O pressure can also overlap with CPU and memory effects. A task waiting for a swapped-in page is part of a memory-related stall, while the underlying device is doing I/O. PSI's resource-specific accounting gives each view a useful diagnostic meaning, but the values should not be added together as if they were independent durations.
Reading the measurements
On a host, Linux exposes PSI in:
/proc/pressure/cpu
/proc/pressure/memory
/proc/pressure/io
A file typically contains lines like:
some avg10=12.50 avg60=4.20 avg300=1.10 total=9876543
full avg10=0.80 avg60=0.20 avg300=0.05 total=123456
The avg10, avg60, and avg300 values are exponentially weighted averages of the percentage of wall-clock time under pressure over approximately 10, 60, and 300 seconds. avg10=12.50 means that, recently, at least one relevant task was stalled for roughly 12.5% of the measured time—not that 12.5% of tasks were stalled. total is cumulative stall time in microseconds.
The same style of files is available for cgroups, allowing an operator to ask whether one container is under pressure even when the host-wide numbers look healthy. In practice, correlate PSI with request latency, run-queue behavior, reclaim or swap activity, and device latency. PSI is not a replacement for utilization metrics; it answers the question those metrics often miss: how much useful work was delayed by contention?