2

I am running Ubuntu 16.04 and my Linux kernel version is 4.4.0. How can I enable the kernel's PSI? Or is there a tool that is similar?

1

Pressure information for each resource is exported through the respective file in /proc/pressure/cpu, memory, and io.

The PSI command for your CPU is:

some avg10=0.00 avg60=0.00 avg300=0.00 total=0

and for memory and IO:

some avg10=0.00 avg60=0.00 avg300=0.00 total=0

full avg10=0.00 avg60=0.00 avg300=0.00 total=0

The “some” line indicates the share of time in which at least some tasks are stalled on a given resource.

The “full” line indicates the share of time in which all non-idle tasks are stalled on a given resource simultaneously. In this state actual CPU cycles are going to waste, and a workload that spends extended time in this state is considered to be thrashing. This has severe impact on performance, and it’s useful to distinguish this situation from a state where some tasks are stalled but the CPU is still doing productive work. As such, time spent in this subset of the stall state is tracked separately and exported in the “full” averages.

More detail can be found in my source, which I added as the link in the first graf of your query.

| improve this answer | |
  • Is it available on kernels of any version? – user769060 May 29 at 20:56
  • I do not know is it is available in any version. – K7AAY May 29 at 21:00
1

For "monitoring" you probably want a running display of current values. You can achieve this by employing watch, like

watch cat /proc/pressure/*

(although here it is difficult to discern what line shows which category)
or

watch "(echo CPU; cat /proc/pressure/cpu ; echo IO; cat /proc/pressure/io; echo MEMORY; cat /proc/pressure/memory)"

which displays something like

CPU
some avg10=0.00 avg60=0.00 avg300=0.04 total=51646098
IO
some avg10=0.00 avg60=0.00 avg300=0.09 total=20413087
full avg10=0.00 avg60=0.00 avg300=0.08 total=16237739
MEMORY
some avg10=0.00 avg60=0.00 avg300=0.00 total=0
full avg10=0.00 avg60=0.00 avg300=0.00 total=0
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.