Incorrect CPU load reported on RPI-OS deb 12

OS type and version Debian Linux 12
Webmin version 2.111
Theme version 21.10
Package updates All installed packages are up to date
kernel: Linux 6.6.28+rpt-rpi-v8 on aarch64

Hi, I just installed Webmin on my RPI 4B with Raspberry Pi OS Bookworm a few days ago. I noticed that the Webmin dashboard reports significantly higher CPU usage than top,htop and btop. This is not an issue for me since I usually use htop to monitor load via CLI but it’s maybe worth a mention.

It doesn’t seem like it’s following any pattern. For example- when each of the 4 cores is loaded up to 20% according to htop/btop, the webmin CPU dial and graph both report 85-86% load so I thought maybe it adds up the individual loads. But when I run a task that loads all cores over 50% webmin reports 90-95% load. Top also reports a significantly lower load than Webmin- at the moment of writing this it’s showing around 30% load while Webmin reports 80%+. This behavior is consistent even after status refresh and reboot.

I also run an x86 server and Webmin correctly reports CPU load- it matches what I see in htop.

Update: I had a task that utilized 100% of external disk I/O while using very little CPU. When I suspended it in Webmin, the CPU usage reported in the dashboard went down to match htop. Is this normal behavior?

Update 2: After some testing, it seems that this issue is isolated to that specific external drive. The I/O performance is varying wildly and I suspected a failing drive since none of the other 6 drives connected to my RPI have this issue. The drive itself is exhibiting very inconsistent behavior as a reformatted EXT4 but is in perfect working condition as a reformatted NTFS. In any case- this is outside of webmin scope

Obviously the dashboard can only report one figure that represents overall usage. Try searching and you will get a variety of ways to compute usage. I don’t know that Webmin is incorrect as much as using a metric other than you expect.

Try mpstat. It breaks out the processes nicely. You will see where I/O is listed in there. Probably what you would expect the dashboard to report is 100% - idle% ?

1 Like

Indeed it can only report one figure, but it seems to include disk I/O under CPU usage which seems a bit weird given that disk I/O has it’s own separate graph.

As for mpstat, it produces a set of values different to Webmin as well as top, htop and btop when running this particular task.

I just tried to reproduce this with a different task that saturates that particular disk I/O and in that case Webmin reports accurate CPU usage- same as htop, top, btop and mpstat.

I will try to find some more ways to track down the cause and report back when I do. Thank you for your suggestions so far.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.