Page 1 of 1

How does VirtualBox (+ other VM software) choose CPU cores?

Posted: 23. Jul 2010, 19:07
by penyuan
Just out of curiosity (sorry if this question is answered elsewhere):

Let's say my CPU has four physical cores, A, B, C, and D.
1. If I give two of them to a virtual machine via VirtualBox's Machine -> Settings... menu item, would this virtual machine use cores A and B?
2. If I start another virtual machine also with two assigned cores, does VirtualBox give it cores C and D?
In other words, does VirtualBox (and perhaps other VM software) intelligently and sequentially assign physical cores to virtual machines as they are started/shutdown?

Thanks!

Re: How does VirtualBox (+ other VM software) choose CPU cores?

Posted: 24. Jul 2010, 13:52
by Sasquatch
It doesn't stick to a core or CPU, it's being load balanced. I have all my VMs set to single core, simply because I don't have the features to run SMP and I often see 50% load on both cores, instead of 100% on one. So your VM can jump between core A and C to B and D and then use A and D, etc.

Re: How does VirtualBox (+ other VM software) choose CPU cores?

Posted: 24. Jul 2010, 14:33
by fixedwheel
Sasquatch wrote:It doesn't stick to a core or CPU, it's being load balanced.
... by the host OS, as its just like any other process running there

Re: How does VirtualBox (+ other VM software) choose CPU cores?

Posted: 24. Jul 2010, 15:01
by penyuan
I see, thanks for the info!

Re: How does VirtualBox (+ other VM software) choose CPU cores?

Posted: 24. Jul 2010, 18:18
by crash0veride
See My thread on Intel SMT and VBox if you are interested in some further details ;)
Intel SMT