Very high cpu usage for two processes

SYSTEM INFORMATION
OS type and version Ubuntu 24.04.3 Linux 6.8.0-84-generic on x86_64
Webmin version 2.510
Virtualmin version 7.40.1
Webserver version Apache/2.4.58

Hi,

I always have mostly two processes getting very high CPU usage:

Is there a way to minimize that cpu usage?

Thank you very much

I think that is not a constant load. If you look at the history. Mostly idle for me. But when you call that cpu page it does show those higher loads, I think because you are using the panel and requesting sites.

3 Likes

To get a better idea what the cup usage is, run top at the command line. It is more real time and not a snapshot of an instant of time.

Those are the processes responsible for the UI in Webmin/Virtualmin, specifically the realtime stats graphs and such. If you’re not looking at Virtualmin, they’ll consume much less CPU (because nothing will be asking them for data).

They’re also not doing much most of the time…just when the UI updates, which means they spike exactly when they’re queried, so observation changes their behavior and in physics and in psychology.

They do seem somewhat demanding on your system, though. I see about 20% usage from xhr.cgi and stats is quite far down the list, well below web server and database processes. Not sure if that just means your system is small or if something else is going on to make these processes busier than usual (maybe many viewers…do you have a bunch of tabs of open or a bunch of users logged into Webmin?).

Those don’t use polling anymore; we use sockets for this. stats.cgi runs only once when the page is fully reloaded, and xhr.cgi runs every time you switch a menu or open a dashboard. But they don’t run every second or anything like that.

And both are generally super light. Maybe, as you mentioned, the user has a lot of other things going on.