DEV Community

Hosni Zaaraoui
Hosni Zaaraoui

Posted on Edited on

[LINUX] Understanding /proc/pressure

/proc/pressure is a Linux Pressure Stall Information (PSI) interface. It tells you whether processes are being delayed because the system is under resource pressure.

Think of it as:

How much time are my processes losing because the CPU, memory, or I/O resources are too busy?

On a Linux system, you'll typically see:

$ ls /proc/pressure/
cpu io memory

1. /proc/pressure/cpu

Shows CPU pressure.

cat /proc/pressure/cpu

Example:

some avg10=0.12 avg60=0.05 avg300=0.02 total=123456
full avg10=0.00 avg60=0.00 avg300=0.00 total=0

some means at least one runnable task was waiting for CPU time.

So if CPU pressure is high, you can have enough CPU overall, but many processes are competing for it at the same time.

2. /proc/pressure/memory

Shows memory pressure.

cat /proc/pressure/memory

This becomes interesting when the system is struggling to satisfy memory demands, potentially involving reclaiming memory or waiting on memory availability.

For example:

some avg10=2.31 avg60=1.20 avg300=0.50 total=...
full avg10=0.15 avg60=0.05 avg300=0.01 total=...

A high full value is particularly significant because it means all non-idle tasks were simultaneously stalled by memory pressure.

3. /proc/pressure/io

Shows I/O pressure.

cat /proc/pressure/io

It measures delays caused by waiting on I/O operations, such as disk storage.

For example, a server doing heavy disk operations could have noticeable I/O pressure even when CPU usage isn't particularly high.

What are some and full?

This is the important part.

some

At least one task is stalled.

Example:

some avg10=5.00

Roughly means that during the last 10 seconds, tasks spent about 5% of the time experiencing some resource contention.

full

All non-idle tasks in the relevant group were stalled simultaneously.

This is generally more severe.

For example, with memory:

some avg10=10.0
full avg10=3.0

means there were periods where tasks were experiencing memory pressure, and periods where everything that could be running was effectively stuck waiting on memory.

What are avg10, avg60, avg300?

They are pressure averages over:

avg10 → last 10 seconds
avg60 → last 60 seconds
avg300 → last 5 minutes

So:

some avg10=20.00 avg60=10.00 avg300=5.00

suggests pressure has recently increased.

You can use this for monitoring because PSI gives you something more meaningful than simply:

top

showing:

CPU: 90%
RAM: 80%
Disk: 70%

A resource can be heavily utilized without necessarily causing processes to wait. PSI focuses on that waiting/stalling aspect.

Why it's useful for sysadmin work

For your kind of Linux administration work, PSI is useful for detecting situations like:

CPU utilization high

Are processes actually waiting?

/proc/pressure/cpu

or:

RAM utilization high

Are processes being stalled?

/proc/pressure/memory

or:

Disk busy

Are applications actually waiting on I/O?

/proc/pressure/io

It's especially useful for performance monitoring, troubleshooting, containers, and capacity planning.

One important distinction: PSI measures pressure, not simply utilization. That's what makes /proc/pressure particularly valuable.

Top comments (0)