VirtualBox 3 – SMP for guests

VirtualBox – my current favourite desktop virtualisation software – has been released in version 3.0.0 two days ago, so I gave it a try. The most interesting new feature in this new version is the “Guest SMP” support. It finally removes the limitation, that a guest can only work on one host core (which means, when you have a 4-core host CPU, the guest could only run with 1/4 of the speed).

The documentation is not very clear about what “Guest SMP” really does – it could, for example, just show multiple CPUs to the guest, but still only use one host core. To make sure that my assumption of VirtualBox 3 actually making it possible to assign multiple host CPUs/cores to the guest, so that it can actually run faster, I did a quick test. I started by making one of my Linux VMs a dual CPU VM:

vbox3_multi_cpu2

In the VM, I then started to build the Linux kernel, once with make -j1 and once with make -j2. This is my CPU usage monitor on the (2-core) host, which shows both cores’ usage combined:

vbox3_multi_cpu

In section 1 of the graph, only one compiler process is running (make -j1). At the end of section 1 I aborted the building process and (in section 2) I typed in make -j2. Thus, section 3 shows the CPU usage when two compiler processes are running simultaneously in the VM. So my assumption was correct, it is now possible to make all of the host’s processing power available in a VM.

Thanks, VirtualBox team! (I won’t address the company behind VirtualBox, since this would probably cause my post to be outdated before I can press the “Publish” button). Lets just hope that this great project will see further development, it is currently the best desktop virtualisation project available, in my opinion. It would be even greater if all of the functionality was available in the Open Source version though. This would ensure that, no matter what the current company behind VirtualBox decides to do with it, development could go on.