How to Monitor Server via PSI (Pressure Stall Information) and cgroupv2?

  • The load average shows the CPU load for the last 1 minute. We may need to see the load average over a much shorter period of time (how about 10 seconds?).
  • You can’t tell if your high load average problem is due to I/O waits. You should see the server’s other stats (iotop, sysstat, etc.).
  • To interpret the load average you have to do some calculations:
    Load average / Number of enabled CPU cores. It may not be clear to new Linux users.
    (You can enable/disable a CPU core by: /sys/devices/system/cpu/cpu_number/online)
Photo by Marcelo Leal on Unsplash
root@adil:~# cat /proc/pressure/cpu
some avg10=0.03 avg60=0.07 avg300=0.06 total=5376072182
root@adil:~# cat /proc/pressure/memory
some avg10=0.00 avg60=0.00 avg300=0.00 total=1249184
full avg10=0.00 avg60=0.00 avg300=0.00 total=317955
root@adil:~# cat /proc/pressure/io
some avg10=0.08 avg60=0.03 avg300=0.00 total=702350375
full avg10=0.00 avg60=0.00 avg300=0.00 total=539254260

What is the difference between some and full?

Image Source:

There is no full keyword in the /proc/pressure/cpu file 🤔

echo 'some 100000 1000000' > /proc/pressure/cpu

PSI (Pressure Stall Information) and Control Group V2 (cgroupv2)

root@adil:~# docker --version
Docker version 20.10.5, build 55c4c88
root@adil:~# mount -t cgroup2 none /sys/fs/cgroup
root@adil:~# docker run -dit --name=nginx nginx
root@adil:~# cat /sys/fs/cgroup/docker/9719184a04057d324408d990ce43e0b040c83f3b69593b36e49ff9d5455cf983/cpu.pressure
some avg10=0.00 avg60=0.00 avg300=0.00 total=13428
root@adil:~# cat /sys/fs/cgroup/docker/9719184a04057d324408d990ce43e0b040c83f3b69593b36e49ff9d5455cf983/memory.pressure
some avg10=0.02 avg60=0.04 avg300=0.01 total=53078
full avg10=0.02 avg60=0.04 avg300=0.01 total=51294
root@adil:~# cat /sys/fs/cgroup/docker/9719184a04057d324408d990ce43e0b040c83f3b69593b36e49ff9d5455cf983/io.pressure
some avg10=0.08 avg60=0.20 avg300=0.06 total=222159
full avg10=0.07 avg60=0.19 avg300=0.06 total=217995




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Do You Wanna Be Our Partner ? -Blokfield.INC

[C++] Variable

e Mobile App vs Web App: What’s The Difference?

Ice wine, Redis and Microcontrollers

Is Kubernetes That Important?

Cross-Cutting Data Requirements in Microservices

Migrating to Seagate Lyve Cloud

lyve cloud migration tool

Batch: An API to bundle multiple PayPal REST operations

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


More from Medium

Exec Probes: A Story about Experiment and Relevant Problems

Understanding the Kubernetes Control Plane 101

Learning Virtualization with kvmtool

3 non-security reasons to implement DevSecOps