Multiple processors

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
pvr4me
Posts: 12
Joined: 22. Apr 2014, 14:19
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: OS X
Contact:

Multiple processors

Post by pvr4me »

Hi:

I'm new to virtualization. Is VirtualBox on OS X stable with multiple processors? I'm running VB on a 2011 MPB i7, 16 GB of ram under 10.6.8 and I was able to create 10.9.2 virtual machine. I set it up with a single processor (yikes is that slow!). I then restarted it with 4 processors and it crashed hard after a few minutes.

My goal is to be able to test builds and packaging for MythTV in different OS X environments (at least 10.6 and 10.9). Myth is a large application and would probably take 24+ hours to build from scratch with 1 processor. I'm not *that* patient! ;)

Is my goal realistic? Are there particular settings that I should toggle one way or the other?

Craig
The MythTV/MacPorts guy.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Multiple processors

Post by socratis »

99.9% of the crashes (kernel panics) for multiprocessor OSX guests in VirtualBox comes from an Apple extension, "/System/Library/Extensions/AppleIntelCPUPowerManagement.kext". Try to rename it to "AppleIntelCPUPowerManagement.kext.216" (for its build number for example) and reboot your guest. See if that fixes it. Mind you, it won't survive an OS update (like 10.9.3). You'll have to rinse and repeat.

A more "stable" solution would be to install an extension called "NullCPUPowerManagement.kext" (search for it in the webs). I'm working on having a build for all major OSX versions (10.5, .6, .7, .8, .9). I'll post something here when I have it available...

EDIT: I'm on a 2011 MBP, 10.6.8, 16 GB RAM, with OSX VMs from 10.5 to 10.9, so we're pretty much twins ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Multiple processors

Post by loukingjr »

pvr4me wrote:Hi:

I'm new to virtualization. Is VirtualBox on OS X stable with multiple processors? I'm running VB on a 2011 MPB i7, 16 GB of ram under 10.6.8 and I was able to create 10.9.2 virtual machine. I set it up with a single processor (yikes is that slow!). I then restarted it with 4 processors and it crashed hard after a few minutes.

My goal is to be able to test builds and packaging for MythTV in different OS X environments (at least 10.6 and 10.9). Myth is a large application and would probably take 24+ hours to build from scratch with 1 processor. I'm not *that* patient! ;)

Is my goal realistic? Are there particular settings that I should toggle one way or the other?

Craig
Not to be finicky but an i7 is one processor with 4 cores. It's not surprising that assigning all four cores to a guest caused a crash. It is recommended that you don't use more than half the cores on your machine. In my experience however, every guest I've run does better with one core on a Mac. As far as how long the build will take, it will always take longer in a VM than on metal. Quite a bit longer I imagine.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
pvr4me
Posts: 12
Joined: 22. Apr 2014, 14:19
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: OS X
Contact:

Re: Multiple processors

Post by pvr4me »

socratis wrote:99.9% of the crashes (kernel panics) for multiprocessor OSX guests in VirtualBox comes from an Apple extension, "/System/Library/Extensions/AppleIntelCPUPowerManagement.kext". Try to rename it to "AppleIntelCPUPowerManagement.kext.216" (for its build number for example) and reboot your guest. See if that fixes it. Mind you, it won't survive an OS update (like 10.9.3). You'll have to rinse and repeat.

A more "stable" solution would be to install an extension called "NullCPUPowerManagement.kext" (search for it in the webs). I'm working on having a build for all major OSX versions (10.5, .6, .7, .8, .9). I'll post something here when I have it available...

EDIT: I'm on a 2011 MBP, 10.6.8, 16 GB RAM, with OSX VMs from 10.5 to 10.9, so we're pretty much twins ;)
Ahh, I saw mention of the power management kext but it wasn't clear that it applied to my situation. I'll try disabling and see if that helps.

Good to know that multiple OS X versions work. How much ram/how many cores do you allocate to a VM?

Craig
The MythTV/MacPorts guy.
pvr4me
Posts: 12
Joined: 22. Apr 2014, 14:19
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: OS X
Contact:

Re: Multiple processors

Post by pvr4me »

loukingjr wrote:Not to be finicky but an i7 is one processor with 4 cores. It's not surprising that assigning all four cores to a guest caused a crash. It is recommended that you don't use more than half the cores on your machine. In my experience however, every guest I've run does better with one core on a Mac. As far as how long the build will take, it will always take longer in a VM than on metal. Quite a bit longer I imagine.
A Core i7 has 4 physical cores presented as 8 virtual cores via Hyper-Threading. Are you saying that VirtualBox uses physical cores? The docs weren't clear.

Can I give a VM 7 out of 8 cores (which appeared to be the max on the settings slider)?

I plan to only run one VM at a time: eg do a build with 10.9, then one with 10.7, etc.

Craig
The MythTV/MacPorts guy.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Multiple processors

Post by socratis »

pvr4me wrote: How much ram/how many cores do you allocate to a VM?
As loukingjr said, it is not a good idea to give all your physical cores to your VM. You have 8 logical, 4 physical. VBox uses physical cores only. That being said, I have an XP VM that runs some simulations => high-CPU demand. I give it 4 CPUs. It runs fine (for days) and I can still do my work on my host (even videos don't stutter). I did a test at some point and I got a nice graph showing the performance on the guest. Mind you that although > 4 works OK for the guest, it doesn't for the host.

As for RAM goes, I would think that your compilation would follow "the-more-the-better" rule. Since you have 16GB (and this is a high demand task) I would go with 8 GB and 4 CPUs, but wouldn't do anything CPU or RAM intensive on the host. Always leave at least 0.5 to 1 GB of RAM free.

Don't blame me if your system catches on fire ;) Two OSX "monitors" that could help you during your endeavor are "XRG" and "Temperature Monitor".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply