aristocratos / btop

A monitor of resources
Apache License 2.0
21.38k stars 656 forks source link

[BUG] Processing reporting above 100% utilization #748

Closed tadghh closed 10 months ago

tadghh commented 10 months ago

Bug Processes will falsely report above 100% utilization, I think this might be due to the calculation for updating the screen with new info.

Expected behavior Cpu% should be representation of all cores -> 100%

Screenshots image

[If applicable, add screenshots to help explain your problem.] btop++ version: 1.2.13 Platform: Rasbian Kernal: 6.1.0-rpi7-rpi-v8 Architecture: aarch64

JeShGrCa commented 10 months ago

CPU usage in the program counter is per-core. As the Raspberry Pi 4 has 4 cores 100% of one core is only equal to 25% total. On a system with 4 cores CPU usage could be as high as 400%.

To switch to total CPU usage for processes simply press 'c'.

tadghh commented 10 months ago

CPU usage in the program counter is per-core. As the Raspberry Pi 4 has 4 cores 100% of one core is only equal to 25% total. On a system with 4 cores CPU usage could be as high as 400%.

To switch to total CPU usage for processes simply press 'c'.

Is there any reason why this is the default? It could be confusing.

JeShGrCa commented 10 months ago

It makes it a lot easier to see how much CPU a given process is using compared to the number of cores; 100% means it's probably using the entirety of one core, while 600% means it's using the entirety of six cores, so on and so forth.

Especially on systems with a lot of cores, such as people running Threadrippers or the like, it is much harder to understand how much CPU a process is really using with total usage.

tadghh commented 10 months ago

It makes it a lot easier to see how much CPU a given process is using compared to the number of cores; 100% means it's probably using the entirety of one core, while 600% means it's using the entirety of six cores, so on and so forth.

Especially on systems with a lot of cores, such as people running Threadrippers or the like, it is much harder to understand how much CPU a process is really using with total usage.

Sorry I still think the UX could be improved. I get what youre saying with threadripper, maybe the target user is different and more for servers? Why would you need to know its using more than one core, if it was cumulative it would show as 10% usage, correct?

imwints commented 10 months ago

Because a process can have multiple threads. I have 16 cores, when a program uses 3 threads at a 100% load, this is shown as 300% load for the process. When proc-per-core is disabled, it shows 18.8%, which doesn't tell me anything on first glance if I don't think about the current computers core count and is less easy to compare to other systems with a different core count where it might show 75% on a 4 core system.

This is also the default for load average, which you can inspect with uptime. 0.5 equals 50% load on one core, 4.0 means 400% load or 100% load on 4 cores.

Sorry I still think the UX could be improved.

I don't think there is a problem since you can switch to the other format.

tadghh commented 10 months ago

Because a process can have multiple threads. I have 16 cores, when a program uses 3 threads at a 100% load, this is shown as 300% load for the process. When proc-per-core is disabled, it shows 18.8%, which doesn't tell me anything on first glance if I don't think about the current computers core count and is less easy to compare to other systems with a different core count where it might show 75% on a 4 core system.

This is also the default for load average, which you can inspect with uptime. 0.5 equals 50% load on one core, 4.0 means 400% load or 100% load on 4 cores.

Sorry I still think the UX could be improved.

I don't think there is a problem since you can switch to the other format.

Ohhhh I see now!