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.
Optimal processor setting for parallel computing in guest
-
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
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.
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!
Manage your VirtualBox infrastructure the free way!