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

Discussions about using Linux guests in VirtualBox.

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

Postby AlexisWilke » 10. May 2021, 22:53

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.
AlexisWilke
 
Posts: 12
Joined: 11. Mar 2021, 19:25

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

Postby scottgus1 » 10. May 2021, 23:40

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.
scottgus1
Site Moderator
 
Posts: 12016
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

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

Postby AlexisWilke » 11. May 2021, 01:07

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.
AlexisWilke
 
Posts: 12
Joined: 11. Mar 2021, 19:25


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 11 guests