'; }
Bug 260029 - sysutils/plasma6-plasma-systemmonitor: excessive use of CPU
Summary: sysutils/plasma6-plasma-systemmonitor: excessive use of CPU
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL: https://forums.freebsd.org/posts/543488
Keywords:
: 290046 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-11-24 18:09 UTC by devnull
Modified: 2025-10-13 15:07 UTC (History)
4 users (show)

See Also:
arrowd: maintainer-feedback+


Attachments
Screenshot: 98% (322.99 KB, image/png)
2021-11-24 18:09 UTC, devnull
no flags Details
screenshot: 100% after removing everything (245.22 KB, image/png)
2021-11-25 23:29 UTC, devnull
no flags Details
Screenshot: Processes tab (288.94 KB, image/png)
2022-08-28 13:57 UTC, devnull
no flags Details
Screenshot: Overview tab (261.02 KB, image/png)
2022-08-28 13:58 UTC, devnull
no flags Details
only start the cgroupdatamodel if available is true (452 bytes, text/plain)
2025-10-07 13:10 UTC, Jesper Schmitz Mouridsen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description devnull freebsd_committerfreebsd_triage 2021-11-24 18:09:25 UTC
Created attachment 229707 [details]
Screenshot: 98%

Shortly after launch, CPU usage by the application rises to 100% (measured by htop) with occasional minor drops. 

% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #115 main-n250650-ef396441ceb: Sat Nov 13 23:52:09 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400041 1400041
%
Comment 1 devnull freebsd_committerfreebsd_triage 2021-11-25 23:29:09 UTC
Created attachment 229731 [details]
screenshot: 100% after removing everything

For a while, it seemed that excessive usage occurred only when the Overview tab was active. 

Whenever I clicked the History tab, usage dropped. Then whenever I reviewed the Overview, usage skyrocketed to 100%; as if viewing History was a workaround. 

After removing everything from the Overview tab, usage no longer dropped when History was viewed. 

After removing/hiding _everything_, usage remained excessive. 

Attached: a screenshot from near the end of a 7.9 MiB screen recording.
Comment 2 devnull freebsd_committerfreebsd_triage 2021-11-26 00:04:46 UTC
(In reply to Graham Perrin from comment #0)

> … 14.0-CURRENT …

Around thirty percent (less excessive) reported by a user of 13.0-RELEASE at and under <https://forums.freebsd.org/posts/543488>.
Comment 3 devnull freebsd_committerfreebsd_triage 2022-08-28 13:57:23 UTC
Created attachment 236179 [details]
Screenshot: Processes tab

plasma5-plasma-systemmonitor-5.24.6 not using excessive CPU. 

Operating System: FreeBSD 14.0
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 14.0-CURRENT (64-bit)
Graphics Platform: X11
Memory: 15.9 GiB of RAM
Graphics Processor: AMD TURKS

% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #19 main-n257401-82493ff7007a: Tue Aug 16 05:16:20 BST 2022     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400065 1400065
%
Comment 4 devnull freebsd_committerfreebsd_triage 2022-08-28 13:58:33 UTC
Created attachment 236180 [details]
Screenshot: Overview tab
Comment 5 Gleb Popov freebsd_committerfreebsd_triage 2025-07-27 10:08:43 UTC
Is this still relevant with Plasma 6?
Comment 6 devnull freebsd_committerfreebsd_triage 2025-07-27 15:40:55 UTC
Thanks for asking. The HP EliteBook 8570p that I used for the 2021 report has been written off. 

I switched to Kubuntu (HP ZBook 17 G2) … FreeBSD in VirtualBox guests on a mobile hard disk drive on USB. Not an environment that's suitable for commenting on performance. 

Can someone else tell? Maybe with a relatively old computer and spinning rust.
Comment 7 Gleb Popov freebsd_committerfreebsd_triage 2025-07-29 18:42:21 UTC
The bug is still relevant.
Comment 8 Gleb Popov freebsd_committerfreebsd_triage 2025-10-06 15:02:11 UTC
*** Bug 290046 has been marked as a duplicate of this bug. ***
Comment 9 Jesper Schmitz Mouridsen freebsd_committerfreebsd_triage 2025-10-07 13:10:24 UTC
Created attachment 264376 [details]
only start the cgroupdatamodel if available is true

This decreases the cpu usages significantly. I did not investigate too much what causes an enabled but not available appModel to have high cpu usage...
Comment 10 Jesper Schmitz Mouridsen freebsd_committerfreebsd_triage 2025-10-08 18:26:07 UTC
(In reply to Jesper Schmitz Mouridsen from comment #9)
Unmodified The interval of the QTimer m_updateTimer CGroupDateModelPrivate is zero when it is started in setEnabled, the problem is that https://github.com/KDE/libksysguard/blob/ff14c3b7086d3dcdce479b5041947a739904374d/processcore/cgroup_data_model.cpp#L110 returns before changing the default zero interval to 2000 ms.. It turns out even a not connected to QTimer::timeout a started QTimer with interval 0 causes high cpu usage..
Comment 11 Gleb Popov freebsd_committerfreebsd_triage 2025-10-08 18:47:20 UTC
(In reply to Jesper Schmitz Mouridsen from comment #10)
Thanks for the hint, I'll try to look into this issue in near days.
Comment 12 commit-hook freebsd_committerfreebsd_triage 2025-10-13 15:05:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fef45ca5f0e3495cf41153b6a4cf201ed4317832

commit fef45ca5f0e3495cf41153b6a4cf201ed4317832
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-10-13 15:02:59 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-10-13 15:04:50 +0000

    sysutils/plasma6-libksysguard: Fix busy-looping in process handling code

    PR:             260029
    Reported by:    jsm (finding the root of the issue)

 sysutils/plasma6-libksysguard/Makefile               |  1 +
 .../patch-processcore_cgroup__data__model.cpp (new)  | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)