Support for multi-core processors?

This is for discussing general topics about how to use VirtualBox.
Post Reply
Jesper
Posts: 4
Joined: 25. Oct 2007, 18:45

Support for multi-core processors?

Post by Jesper »

Does VirtualBox support multi-core processors?

I have an Intel Core 2 Duo, but my Windows XP virtual machine sees only one processor. If VirtualBox allows a VM to use only one of my two cores... then that's a severe limitation of VirtualBox!

Running VirtualBox 1.5.2 on Ubuntu 7.10 with Win XP SP2 as a guest OS.
merlin88
Posts: 4
Joined: 28. Oct 2007, 23:46

Post by merlin88 »

That would be interesting for me too.

a) As I unerstand, virtualbox can run vmware images. What about images, which are using to virtual processors?

b) What happens, if I run several machines on my host (or even just one), will the load spread on the different core of a quad core processor?

Best regards

merlin88
sandervl
Volunteer
Posts: 1064
Joined: 10. May 2007, 10:27
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Windows, Linux, Solaris

Post by sandervl »

1) guest SMP is not supported but planned for the future
2) guest SMP kernels tend to work fine with uniprocessor VMs
3) VirtualBox is multithreaded and will use available cores for e.g. IO (disk & network) support threads. Multiple VMs will be scheduled across all cores. That's up to the host OS.
merlin88
Posts: 4
Joined: 28. Oct 2007, 23:46

Post by merlin88 »

Thanks for your quick answer!
disi
Posts: 5
Joined: 15. Nov 2007, 17:40

Post by disi »

So, does this actual mean, that the Host and the Guest System have the same resources of CPU?

Because this would be an interesting test to compare 64bit to 32bit?

I noticed that, especially during compiling, the 64bit host is much faster than the system in the Box.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

The only known way to make fast SMP is via Intel FlexPriority (which will require new hi-end CPU).

I see FlexPriority as Vanderpool Technology v1.5.
plug
Posts: 5
Joined: 5. Sep 2007, 16:46

100% cpu ?

Post by plug »

I run virtualbox on winXP with Linux as a guest.
On my dual core laptop, virtualbox can use a whole cpu even when Idle, the only way to make it less cpu intensive is to force the windows scheduler to bind all virtualbox processes (service + others) on the same cpu. When they are scheduled otherwise, I loose a whole cpu for virtualbox.

Do you have the same problem ??
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

no.
disi
Posts: 5
Joined: 15. Nov 2007, 17:40

Re: 100% cpu ?

Post by disi »

plug wrote:I run virtualbox on winXP with Linux as a guest.
On my dual core laptop, virtualbox can use a whole cpu even when Idle, the only way to make it less cpu intensive is to force the windows scheduler to bind all virtualbox processes (service + others) on the same cpu. When they are scheduled otherwise, I loose a whole cpu for virtualbox.

Do you have the same problem ??
Here I use Linux as host and there are no problems, both CPU are used equally and the GOVERNOR works properly. So if the Box does nothing the CPUs are smooth at ~5% and 1000MHz :)
DreadNot
Posts: 1
Joined: 20. Feb 2008, 02:49

Post by DreadNot »

I have the same problem as plug.

System:
Intel(R) Core(TM)2 CPU
T5500 @ 1.66GHz
981 Mhz 0.99 GB of RAM
Physical Address Extension

Host OS: Windows XP
Guest OS: Linux (CentOS 5.1 2.6.18-53.1.13.el5 "normal", 5.1 2.6.18-53.1.4.el5vm "100Hz")

Specifically, when the guest OS process runs across both CPUs it maintains a usage of about 50% total (~50% on each processor) when the guest is idle. When I set this process' affinity to CPU 0, it drops significantly to ~20% total (40% on CPU 0). Additionally, when I set the OS option "divider=10" or use a 100Hz version, it drops to 1-3% total usage.

If I set the process' affinity to CPU 1, usage goes to 50% (100% on CPU 1) on the "normal" guest OS and fluctuates about 47% (95% on CPU 1) on the 100Hz version. Its like it needs something only CPU 0 can provide.

The other VirtualBox processes are set to use both CPUs.
lazareth
Posts: 4
Joined: 21. Jan 2009, 07:21

Any update on guest SMP?

Post by lazareth »

Back in 2007, Sander van Leeuwen said:
1) guest SMP is not supported but planned for the future

Any word on if this support is still coming and when that might be? It would be helpful to have this feature for developing multi-threaded applications
nabamer.

Post by nabamer. »

very helpful.
chrone
Posts: 25
Joined: 10. Apr 2009, 20:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu

Re: Support for multi-core processors?

Post by chrone »

hope they will support smp and parallel port in the future :)
everytime i get ahead, i feel more dead..
Shinare
Posts: 14
Joined: 27. Apr 2009, 16:18
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Windows/Ubuntu/Suse

Re: Support for multi-core processors?

Post by Shinare »

There would be nothing holding back VirtualBox if you could use multi-core under a guest OS. This single feature is still the reason I don't use VirtualBox (preferred) in production but have to use another company's software that does support multiple cores in a guest. This is a requirement that I just can not ignore.
foupfeiffer
Posts: 2
Joined: 27. Jan 2009, 16:18

Re: Support for multi-core processors?

Post by foupfeiffer »

Virtualbox 3.0 and on supports Guest SMP

Guest SMP with up to 32 virtual CPUs (VT-x and AMD-V only; see chapter 3.7.2.2 of the user manual)

http://www.virtualbox.org/wiki/Changelog

I haven't tried it yet but it's definitely a step forward. With VMware and Hyper-V (Microsoft) obviously closed source, Xen being part of Citrix (and planning to go closed source), and now Virtualbox (Sun) being bought by Oracle (who will definitely kill MySQL), will Virtualbox remain open source? Is there an alternative open source out there?

http://kittyandbear.net/john/virtualization
Post Reply