Every time I attempt to use virtualbox and install many packages (either using vanilla ubuntu base installer .iso or vagrant+chef), the kernel_task process frequently uses 100% of cpu for many minutes. The host OS becomes unresponsive (mouse freezes for minutes) and sometimes crashes. This was the case today and a few months ago when I first tried out vagrant.
VirtualBox version 4.1.10 r76795
System Version: Mac OS X 10.7.3 (11D50b)
Model Name: MacBook
Model Identifier: MacBook5,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache: 3 MB
Memory: 4 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MB51.007D.B03
SMC Version (system): 1.32f8
I have an Intel SSD as my disk.
I would appreciate any suggestions you have.
100% System CPU on Lion host OS
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: 100% System CPU on Lion host OS
The 100% CPU usage is expected if you have given all processors to the guest. In other words if you have 2 on the host and give 2 to the guest it will use what it is given. Likewise if you have 2 on the host and give 1 to the guest it will use approx 50% of the total.
Another alternative is to use the CPU execution cap and only allow a certain percentage of the processor to be used, but the preferred is to leave one for the host.
Another alternative is to use the CPU execution cap and only allow a certain percentage of the processor to be used, but the preferred is to leave one for the host.
-
stuntbeard
- Posts: 4
- Joined: 23. Mar 2012, 17:46
Re: 100% System CPU on Lion host OS
Thank you Perryg for responding. I really appreciate when anyone takes the time to respond in a public forum like this.
It appears that I have allocated one of my two cores to this virtualbox machine (it was the default). When I move the slider to 2 CPUs, it warns me that it is sub-optimal. I will try with a 75% cap on the one CPU.
It appears that I have allocated one of my two cores to this virtualbox machine (it was the default). When I move the slider to 2 CPUs, it warns me that it is sub-optimal. I will try with a 75% cap on the one CPU.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: 100% System CPU on Lion host OS
Humm, That sounds odd that the host would be at 100% if the guest only has one processor enabled in it. Perhaps hyper-threading I guess, but none of my Linux hosts see this abnormality. Maybe someone that uses a Macintosh host more than I will have better insight to this issue.
-
stuntbeard
- Posts: 4
- Joined: 23. Mar 2012, 17:46
Re: 100% System CPU on Lion host OS
There are two cores and hyperthreading is not in play here.
I would expect the virtualbox process to eat up plenty of User cpu time when doing lots of work, but it seems very odd that it is causing so much System cpu usage (kernel_task process). That's what seems abnormal to me.
I would expect the virtualbox process to eat up plenty of User cpu time when doing lots of work, but it seems very odd that it is causing so much System cpu usage (kernel_task process). That's what seems abnormal to me.
-
stuntbeard
- Posts: 4
- Joined: 23. Mar 2012, 17:46
Re: 100% System CPU on Lion host OS
I tried running with a 75% cap on cpu usage, but that didn't stop the kernel from getting swamped and bogging down the host OS.
Anyone have any more ideas? I have tried a few virtualbox releases without luck, but I'm willing to try anything here.
Anyone have any more ideas? I have tried a few virtualbox releases without luck, but I'm willing to try anything here.
-
hank
- Posts: 113
- Joined: 9. Jan 2011, 17:31
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Windows 7, XP
Re: 100% System CPU on Lion host OS
Utter beginner here; I was warned I'd get problems if I tried to assign 'too much' memory in the /System/Base memory settings for guest VM; 1GB or 2GB seems enough (and I've got a recent mini with 12GB of RAM, one 8 and one 4GB stick in it; I went up from 8GB hoping I could run two Windows guests at once and it seemed to help sometimes, but not to remove problems, so I stick with one VM at a time.
Perhaps someone who knows can comment?
Perhaps someone who knows can comment?
Re: 100% System CPU on Lion host OS
I have the same problem, using vagrant and puppet to install many packages on a linux guest. I can boot the VM and SSH in and use it with no problems, but when I start puppet downloading and installing packages, the system cpu jumps to 100% and the host freezes and crashes.
My system details are:
VirtualBox version 4.1.18 r78361
System Version: Mac OS X 10.7.4 (11E53)
Model Name: MacBook
Model Identifier: MacBook7,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache: 3 MB
Memory: 8 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MBP71.0039.B03
SMC Version (system): 1.62f6
I also have an SSD (Crucial), but I tested by running the VM on an external HDD and had the same problem.
I'm sorry I can't offer any help. Stuntbeard, did you learn any more about what the problem was for you?
My system details are:
VirtualBox version 4.1.18 r78361
System Version: Mac OS X 10.7.4 (11E53)
Model Name: MacBook
Model Identifier: MacBook7,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache: 3 MB
Memory: 8 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MBP71.0039.B03
SMC Version (system): 1.62f6
I also have an SSD (Crucial), but I tested by running the VM on an external HDD and had the same problem.
I'm sorry I can't offer any help. Stuntbeard, did you learn any more about what the problem was for you?
Re: 100% System CPU on Lion host OS
After more testing and consulting a knowledgable friend, I managed to solve this.
What I needed to do was enable PAE/NX (in System>Processor), and that stopped the 100% CPU from happening.
With vagrant, this is slightly more involved. Without repackaging the vagrant box, you can run
Which should get you a running VM, without firing up puppet/chef and triggering the problem. Then you can power down the VM, and change the settings in the VirtualBox Manager.
I hope that helps.
What I needed to do was enable PAE/NX (in System>Processor), and that stopped the 100% CPU from happening.
With vagrant, this is slightly more involved. Without repackaging the vagrant box, you can run
Code: Select all
vagrant up --no-provisionI hope that helps.