14

When I play a movie with SMPlayer (video:mpv) and I check my CPU usage with GNOME system monitor, it shows %4 or %5 CPU usage (1 second update interval), but htop shows %45 CPU usage:

mpv cpu usage

top shows the same load as htop:

top mpv cpu usage

Since My CPU fan RPM goes higher when I'm playing movie with SMPlayer. I suspect top is reporting CPU usage more accurately.

I have Intel i7 920 with 6GB RAM.

Why do I have high CPU usage and why do I see different results on top and in GNOME system monitor?

Zanna
  • 69,223
  • 56
  • 216
  • 327
ICE
  • 2,065
  • 4
  • 26
  • 42
  • 1
    when in `top`, press `1` to see percentages of individual cores – Robert Riedl Feb 26 '18 at 07:35
  • 1
    @thomasrutter Through my experience of working on servers, if you have a dual core running 100.00 your system is in major trouble and probably hanging. There is a reason why we use 32+ core systems here as a lot of loaded systems will hit 25.00 in the 1 minute and above. Even this one says that load average of 6.03 on a single core is bad, but on an 8 core is fine. https://www.howtogeek.com/194642/understanding-the-load-average-on-linux-and-other-unix-like-systems/ – Terrance Feb 26 '18 at 22:38
  • @Terrance, I am aware that 100 load average is highly overloaded, just pointing out that it is possible. Your previous comment said load average on an 8 core machine could go up to 8. – thomasrutter Feb 26 '18 at 22:41
  • @thomasrutter Yeah, I meant that as you would be fine. – Terrance Feb 26 '18 at 22:42
  • This question is not even close to being a duplicate of that other one, what happened? – thomasrutter Mar 08 '18 at 01:46

1 Answers1

24

Notice that one reading is 8 times higher than the other. You have 8 cores (or execution units). The simplest explanation is that one is calculating it as a percentage of a single core, and the other as a percentage of all eight of them.

According to this, top does indeed show CPU use per process as a percentage of a single CPU core.

thomasrutter
  • 36,068
  • 10
  • 86
  • 105
  • 8
    This also explains why `top` can sometimes show processes using more than 100% CPU. On an 8 core CPU, up to 800% can be used – Suppen Feb 26 '18 at 08:11