fflewddur / tophat

View CPU, memory, disk, and network activity in the GNOME top bar.
https://extensions.gnome.org/extension/5219/tophat/
GNU General Public License v3.0
338 stars 26 forks source link

CPU usage of the top processes is divided by core count. #89

Open hsiktas opened 1 year ago

hsiktas commented 1 year ago

Hello,

it seems like the CPU usage of the top processes is divided by core count. On nix systems, full load on a single core is always shown as 100% CPU load and the max load is `100% (Number of Cores). TopHat behaves like Windows here: full load on all cores together is shown as 100% and full load on a single core is shown as100% / (Number of Cores)`.

Would it make sense to change the display of these top processes to the "*nix-way"? I think it is more intuitive, and it is easier to notice hanging processes at a single glance without doing these small calculations in the head.

fflewddur commented 1 year ago

This was a deliberate design decision on my part. If individual processes are measured per core, with one core's full use represented by 100%, you get multi-threaded processes using more than 100% of CPU. I wanted the overall processor utilization to be 0 - 100%, rather than 0 - [# of cores * 100]%.

I'll leave this issue open to see what other folks think. I could imagine this being a configurable preference.

colinrgodsey commented 1 year ago

configurable might be nice. think it really depends on the person and their linux exposure- me being very used to top, i like seeing percent as a ratio of a single core (plus with these new 20+ core CPUs, the mental math is a bit much sometimes lol), but normal people might just care about the percent of overall cpu resource :man_shrugging: