Optimal processor setting for parallel computing in guest

This is for discussing general topics about how to use VirtualBox.
Post Reply
jim345
Posts: 1
Joined: 3. Apr 2013, 23:43

Optimal processor setting for parallel computing in guest

Post 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.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Optimal processor setting for parallel computing in gues

Post 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.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply