Page 1 of 1

Virtualbox CPU Utilization

Posted: 26. Mar 2012, 20:21
by TechGoudy
Hello All,

This is my first post and I apologize if I put this in the wrong the section. I have been looking around for a answer, and I am now posting a question because I cannot find it anywhere.

I am setting up a virtual lab and Windows 7 is the host.

After I setup the lab I had 5 VMs running simulatenously, plus the host.
The 5 VMs were:
-Windows XP
-Windows Server 2008
-Windows 8
-Windows 8 Server
-Fedora (security edition)

All of these VMs were running and the CPU utilization was under 10% on the main host. Granted they were all idle I still do not understand.

Should I have tried measuring the activity in the VM itself?

I have an i7 2600 with 8GB of 1333 RAM. (I included this in case it was needed)

I do not understand why and would really like for this to be explained or a place to go to find out more information.

Thank you in advance!

Re: Virtualbox CPU Utilization

Posted: 26. Mar 2012, 20:47
by mpack
You made a number of observations, but what is your question? Are you asking why CPU use is so low? That's because a modern OS does not have an idle loop. Instead it puts the CPU into an idle mode, which in the case of a VM means that it has low CPU use. For some older guests, e.g. Win98, you need a third party app (Rain) to put the CPU into idle.

Re: Virtualbox CPU Utilization

Posted: 26. Mar 2012, 21:29
by TechGoudy
You are actually spot on. Thanks, I didnt realize I didnt really ask a question until you mentioned it, sorry.

But I guess what I wanna know is how Virtualbox goes about allocating the CPU to virtual machines.

I know each VM can have as many CPUs as you want to give them but does that mean that there will be a particular Core that Virtual box will set aside for the VM? Or is it more like a shared pool of resources which the VM will take any available core and use however many cores it is allowed to use?

I do apologize if this sounds confusing or Im not making much sense.

Re: Virtualbox CPU Utilization

Posted: 27. Mar 2012, 10:50
by mpack
Just FYI, assigning more than one CPU to a VM requires the IO APIC setting to be enabled.

In general you should not assign more CPUs to a VM then you have available. The host should be left with at least one.