Bug 438287

Summary: KNotes wrong RAM usage in overview
Product: [Applications] plasma-systemmonitor Reporter: d3coder <admin>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ahiemstra, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: knotes memory usage in overview
knotes memory usage in process list
knotes process details

Description d3coder 2021-06-08 19:49:23 UTC
Created attachment 139115 [details]
knotes memory usage in overview

SUMMARY
While in overview, system monitor says knotes uses 457MiB of RAM
In process list it says that knotes uses 63MiB

STEPS TO REPRODUCE
1. Start knotes
2. Start plasma system monitor
3. Check knotes memory usage

OBSERVED RESULT
Wrong memory usage reported in overview

EXPECTED RESULT
Correct memory usage reported in overview

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.90
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.12.9-arch1-1 (64-bit)
Comment 1 d3coder 2021-06-08 19:49:40 UTC
Created attachment 139116 [details]
knotes memory usage in process list
Comment 2 Nate Graham 2021-06-08 20:02:58 UTC
Can you go to the Applications page, click on KNotes, and click on the "Show Details Sidebar" button in the toolbar? In this sidebar, you can see all of the processes that the app could detect as being a part of knotes. That may shed more light on the situation. If it does not, can yo please share a screenshot of it--or even better, of the whole window?
Comment 3 d3coder 2021-06-08 20:05:46 UTC
Created attachment 139117 [details]
knotes process details

That's akonadi
Comment 4 Nate Graham 2021-06-08 20:10:48 UTC
Well there you go. :) KNotes uses Akonadi and it's responsible for the additional resource usage. So in fact, System Monitor is showing you the truth of the situation more than KSusGuard did, by revealing the additional resource usage by other processes that Knotes is using but did not directly spawn as child processes.
Comment 5 d3coder 2021-06-08 20:15:06 UTC
How email and knotes are related? Why kmail does not use akonadi then?
Comment 6 Nate Graham 2021-06-08 20:43:54 UTC
KMail also does use AKonadi.

I don't use any of these apps myself so I can't really help you understand why they were architected the way they were. But System Monitor is now showing you the truth. :)
Comment 7 Arjen Hiemstra 2021-06-09 11:49:57 UTC
The actual issue here is that Akonadi is started as part of the same cgroup as KNotes/KMail/KOrganiser or whatever Akonadi using application that gets started when Akonadi is not running. The best thing to do would be to report this to the Akonadi developers who ideally should make sure Akonadi is additionally started as part of "background.slice" cgroup.
Comment 8 d3coder 2021-06-09 11:53:24 UTC
Could you please report it? I don't understand such low lever stuff. I don't understand what should i tell akonadi devs.