Bug 455784 - Support for Pressure Stall Information from /proc in ksysguardd
Summary: Support for Pressure Stall Information from /proc in ksysguardd
Status: RESOLVED UNMAINTAINED
Alias: None
Product: ksysguard
Classification: Unmaintained
Component: ksysguardd (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-22 12:14 UTC by Adrian
Modified: 2023-12-30 07:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian 2022-06-22 12:14:39 UTC
SUMMARY
With the new Pressure Stall Information (https://lwn.net/Articles/753840/) added as of kernel 5.X or so, there are now  /proc/pressure/[memory, cpu, io] files available that provide information on how much "pressure" different resources (CPU, memory, IO) are under. This is similar to how the MacOS activity monitor app displays memory data to users by default and may be desirable for linux users to be able to have this information available in their ksysguard.

To paraphrase the lined article, the data provided in this proc file essentially shows two lines. "Some", which indicates "the time in which at least one task is stalled on the resource." and "full", which "indicates time in which *nobody* is using the [resource] productively due to pressure". There are some nuances for the different resources but thats the TL;DR. Each of these datapoints is provided as rolling averages over a few time periods (10 sec, 60 sec, 300 sec) as well as a total count).

I took a look at the source code for the "memory/physical/used" sensor, which seems fundamentally similar in that it, unlike most other sensors, also seems to get its data from a file in /proc, rather than from lm-sensors or another physical sensor. heres the section of the source that led me to this conclusion: https://invent.kde.org/plasma/ksysguard/-/blob/master/ksysguardd/Linux/Memory.c#L118

I would like to submit a patch that makes this data available as sensors in ksysguardd (and thus allow them to appear in the ksysguard and Plasma System Monitor apps). My current plan is to mirror the existing implementation from the file linked above and tweak it to parse the information from the various /proc/pressure files instead of /proc/meminfo.

Would a patch like this be something that would be useful to the ksysguardd project? Am i misunderstanding anything about how to go about making this change or how users of ksysguard/Plasma System Monitor could take advantage of this?
Comment 1 Adrian 2023-12-30 07:38:39 UTC
ksysguardd seems like it may be deprecated in favor of ksystemstats