Page 1 of 1

Optimal processor setting for parallel computing in guest

Posted: 4. Apr 2013, 00:04
by jim345
How many processors should I assign to the guest OS to get maximum performance in multi-threaded / parallel computing on the guest OS?

Details: Win7 host, Ubuntu 12.04 guest, Intel i7 3770 Quad Core CPU. VirtualBox reports 16 processors, with up to 8 as an "optimal" setting.

I'm running Maven 3 on the guest, I tired with maven arg "-T C1" which means assign one thread per core. When I assigned 4 processors to the guest it ran faster than with 8 processors assigned.

Re: Optimal processor setting for parallel computing in gues

Posted: 4. Apr 2013, 00:11
by noteirak
Your CPU has 4 physical cores and 8 logical, or "virtual", cores due to Hyperthreading.
Virtualbox will indicate that you are safe to use up to 8 cores, since you are not overcomiting cores-wise, and any higher value would mean that, which is bad.
The issue with Hyperthreading is that you're actualling trying to do 2 things at the same time with only one brain - sure you can, but both things will take more time.

The optimal setting is to keep within the physical cores available (in your case 4). If your computer is not a dedicated host, you should also keep one for the host itself.