I thought the system was slow for a while, and after running the task manager, I found out that some zombie processes were consuming 100% of the CPU. I did not notice it for a while, and maybe novice users would never know when it happens to their system.
How about Plasma comes with a notification feature that lets users know when background processes (i.e., processes with no visible window) take nearly 100% CPU for a while (e.g., more than 30 seconds)? It could simply be a small icon in the system tray area. When the user places the mouse over it, it could show “Process XXXX is taking a lot of CPU for a long time.”
These processes wouldn’t happen to be kworker/baloo, right?
Anyway, I think it sounds like a very helpful feature. I don’t know about putting them in the tray though, I think I would prefer a notification, as long as I don’t get spammed by them.
But tracking each process, and for how long they’ve been in a specific state… That may be a bit much for kde to track? I suppose you could just have a periodic check for Zombie processes, like every 30~60 seconds, and any PID that is still around for the next check, could issue a notification with options to “ignore”, “kill” and “don’t ask again”.
Maybe it could be opened up to have configurable rules as well? So that you could be warned about “any application using more 80% CPU” or “firefox if it uses more than 16GB of RAM” etc. etc. This would also require having exclusions though, so that you aren’t constantly being warned that kdenlive uses 80% CPU while you’re doing a big render.
But there’s also a good chance that this could lead people to just KILL important system processes it might be a bit dangerous.
Nah, it was multiple zombie Chromium processes. I was playing StarCraft 2 using Bottles, and I noticed that the graphics become choppy. At first, I thought it was network lagging, but it happened again in the next game. It turned out that a lot of processes whose name start with “Cr” were taking 100% CPU. Probably they were from the launcher which is probably an Electron app.
Yeah, I thought about false positives. That is why I thought it should be as least obtrusive as possible. A notification pop-up actively blocks user’s view and requires the user to close it. But just an icon in the system tray won’t. I thought it’s not something like “Something is wrong! You must do something to solve this.” but "In case you don’t know, the CPU is full. System may react slow. " I think this could be helpful, even if the processes that take the 100% CPU are legitimate processes, because one time, the audio was choppy and then I realised that the system update process was doing lengthy AUR compiling in the background.
I don’t know much about the system, so I don’t really know how it should be implemented, but if it can be easily turned off (e.g., right-click the icon, choose “disable resource monitoring”), it would not bother power users much.
My recomendation is STOP DOING THAT IMMEDIATELY!
Updates on arch should be done manually so you can READ what is happening and if you need to take any kind of action on your system.
If you do this for “normal” updates too, I wonder how many pacnew’s you have on your system… sudo find /etc -name '*.pacnew' -o -name '*.pacsave'
Also, ALWAYS have you system up to date (sudo pacman -Syu) BEFORE installing/updating anything from the AUR!
As for cpu monitoring, you can make a widget that shows how much cpu is used.
Other than that, a “warning” makes no sense to me. How would the system know what is a wanted process or not?
How would this work on an old computer with a slow cpu?
To me this would only add overhead and returning a TON of false positives making the feature more or less useless.