Page 1 of 1

Is the Host expected to use *much more* CPU than the Guest?

Posted: 10. May 2021, 22:53
by AlexisWilke
I have a guest which uses about 20% to 30% of its CPUs (looking at htop). It's load average remains under 0.2.

However, the host for that machine uses around 60% of one of my CPUs.

Is that expected?

Possibly Important Factors:

I have just 4Gb of RAM assigned and generally use under 2Gb.

I run X-Windows in that guest with a resolution of 1920x1080 ("2K" which fits well on my 4K monitor). The 2D & 3D accelerate is turned on (I don't use 3D, though, just a console and a simple Qt app. on top of background daemons).

I assigned 32 CPUs to that machine, because I often compile on it and that way it goes FAST when I do so.

Re: Is the Host expected to use *much more* CPU than the Guest?

Posted: 10. May 2021, 23:40
by scottgus1
AlexisWilke wrote:I assigned 32 CPUs to that machine
Each 'processor' is another thread on the host PC, and those threads take time to process. If you drop to 2 processors and the VM's 'htop' drops to reasonable values, but the 32-processor setting shoves the htop back up, then that's the cause.

If your compiling is lickety-split, you may just have to endure the high htop.

Re: Is the Host expected to use *much more* CPU than the Guest?

Posted: 11. May 2021, 01:07
by AlexisWilke
Okay, once I reboot that VM, I'll test with many less CPUs to see the difference. That's what I was thinking, I didn't know, though, that it would be running as a thread on the host. Cool nugget. Thank you.