htop-dev / htop

htop - an interactive process viewer
https://htop.dev/
GNU General Public License v2.0
6.1k stars 410 forks source link

htop is using much cpu itself #1484

Open webcaptcha opened 1 month ago

webcaptcha commented 1 month ago

I'm on KDE Plasma on Wayland session

Terminal emulator - Alacritty When I run htop it's usually shows around 15% CPU with peaks up to 25%

Is it ok? For example on the screenshot at the same time Firefox was playing video. Screenshot_20240524_174128

If it needed I can make a video but almost all time it uses than numbers of CPU

CPU - AMD 7840HS GPU - intergrated RAM - 32GB

htop default config

Explorer09 commented 1 month ago

The CPU percentage displayed is per core, so when you have 16 CPU core (or threads) active, the maximum would be 1600%. Do you consider this takes too much CPU usage?

natoscott commented 1 month ago

@webcaptcha are you using the default sampling interval (1.5s) or something more frequent? Looks like you have over 2000 processes running there - visiting each in /proc does take a small amount of time and it all adds up. You might find some additional insights by adding the UTIME and STIME columns and observing htop there as well (I expect you'll see much higher kernel time than user time).

BenBE commented 1 month ago

Can you provide a copy of your htoprc configuration file?