nokyan / resources

Keep an eye on system resources
GNU General Public License v3.0
611 stars 46 forks source link

non-normalised (not divided by the core count) CPU usage in processes tab #231

Closed Mr-Blue-Sky-Candy closed 1 month ago

Mr-Blue-Sky-Candy commented 1 month ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

The CPU usage is divided by the core count by default in the processes tab. Even though a process is using 100% of a core, Resources shows it is using around 6%. Seeing a programme is not using 100% when it should allows the user to understand whether there is another bottleneck such as disk IO.

Describe alternatives you've considered

Mission centre has a setting for it: image It can be added as a column to toggle as well. Both are reasonable.

Additional context

No response

nokyan commented 1 month ago

Hi, thanks for the issue. It should be relatively straight forward to implement as a setting, I'll do it at some point, I'm quite busy right now.

Though admittedly I fail to see the point in that feature. A process using up one core of your CPU is not using 100% of your CPU if it's not a single core CPU.

Mr-Blue-Sky-Candy commented 1 month ago

Thanks for letting me know that you didn't understand the point. I code nuclear physics simulations that read huge amounts of data off SSDs. Some of the processing takes place in the CPU and some takes place in the GPU. GPU is already multithreaded but I also code the part that run on the CPU using multiprocessing libraries. Sometimes, there is a disk, GPU or swap space bottleneck. I can detect the bottleneck by how much of the CPU core one of my processes using. I do this with htop right now. In addition, if a processes is in a an infinite loop but it is using a single core, resources will show ~ 6% usage. Similarly if a single-threaded processes using 100% of a CPU core, it will appear to be consuming less CPU than a humbly running concurrent process. This is also the default behaviour with glances, htop, btop, and mission centre.