Bug 479740 - Unreasonably high CPU usage
Summary: Unreasonably high CPU usage
Status: RESOLVED DUPLICATE of bug 434877
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.92.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-13 14:52 UTC by madcatx
Modified: 2024-02-15 21:55 UTC (History)
3 users (show)

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


Attachments
plasma-systemmonitor CPU usage on an idling system (94.26 KB, image/jpeg)
2024-01-13 14:52 UTC, madcatx
Details
Comparison between plasma-systemmonitor and htop (593.01 KB, image/jpeg)
2024-01-13 14:53 UTC, madcatx
Details
Function call flamegraph from Hotspot (only the important bit) (593.90 KB, image/jpeg)
2024-01-13 14:54 UTC, madcatx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description madcatx 2024-01-13 14:52:03 UTC
This issue is very likely not related to plasma-systemmonitor directly but it is the only tool from the KDE suite I have available.

For a program that is supposed to query statuses of system utilization once it a while, the program seems to utilize the CPU a lot. On an otherwise completely idle system, plasma-systemmonitor will use anywhere between approx. 15 - 25 % CPU when showing the list of all active processes. I don't have the CPU usage readout normalized so the maximum would be 800 % on my Intel i7-3632QM.

For comparison, similarly configured htop never uses more than ~8 % CPU. For further comparison, on this system, Firefox playing Full HD video stream needs about 30 % of CPU time (all non-normalized).

According to the profiler, most of the time is spent inside the Qt signalling machinery. I built both plasma-systemmonitor and libksysguard with debugging information and frame pointers enabled so the perf log is hopefully accurate enough.

I installed plasma-systemmonitor only when I started testing Plasma 6. I don't recall any of the Plasma 5 resource monitoring tools to ever even show up on a CPU-usage-sorted list and I was using those tools a lot.

I attached some screenshots to illustrate the problem better. Mind that the sampling rate and CPU frequency scaling obscures the readout a bit.
Comment 1 madcatx 2024-01-13 14:52:35 UTC
Created attachment 164864 [details]
plasma-systemmonitor CPU usage on an idling system
Comment 2 madcatx 2024-01-13 14:53:53 UTC
Created attachment 164865 [details]
Comparison between plasma-systemmonitor and htop

On this screenshot, Firefox is playing a randomly picked Twitch stream set to 1080p/60fps quality.
Comment 3 madcatx 2024-01-13 14:54:47 UTC
Created attachment 164866 [details]
Function call flamegraph from Hotspot (only the important bit)
Comment 4 Nate Graham 2024-02-15 21:55:04 UTC

*** This bug has been marked as a duplicate of bug 434877 ***