VirtualBox High CPU Usage Problem Solved
Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates
A few days ago, I had to install Windows XP as a guest OS on my Ubuntu Hardy machine as I needed to carry out some Visual Studio work. What I noticed was that my CPU usage went through the roof (constantly at 100%) even if the guest was completely idle. Result: My laptop was shutting down within a few minutes because the CPU was heating up and its temperature going beyond 75C. And finally came to know a simple solution from a friend, that immediately worked. The solution was to create a new dummy guest machine in VirtualBox, allocate minimal RAM to it (I gave 4MB) and just run it, don’t even need to add boot disk to it and to my surprise, the CPU usage came down to just 3-4% immediately. I’m not sure why this issue is happening and how the dummy machine solved it but atleast it is working for me now. If you have a similar issue, you can try out the same.
© Shantanu Goel | VirtualBox High CPU Usage Problem Solved
|
Liked this post? Get FREE Updates Subscribe to RSS feed |






This post has 8 comments
July 9th, 2009
I tried this on Ubuntu 9.04.
my cpu usage still remains around 45% (it was the same before also)
July 11th, 2009
@Himanshu: Your issue might be something else then. For me, it was continuously around 95-100% before this.
August 24th, 2009
Hi shantz.
Strange issue, I ran into some strange trouble with VirtualBox recently too. Like 3 times within 7 days my XP bluescreened and refused to boot afterwards whatsoever. So I had to backup an image I found on some external hd by chance, just to run into the same bluescreen -> unbotable state again.
However, I had to suffer from a 2 low threshold setting (as I thought it was) as well. 85° and my Laptop would power off. Very annoying as such high loads usually only occur during builds.
Finally I stumbled upon linux-phc, a module which enables undervolting.
And actually, reading my cpu’s msr told me that the default vids were too high, namely 1,375V.
Compared to what Intel defines as max, 1,175V, fixing this prevented my PC from temperature caused shutdowns ever since, my temperatures don’t exceed 80° anymore ever since, no matter what.
I’ve been able to set the first 3 steps to the lowest possible voltage (hardcoded), the highest frequency to just one step higher.
So, if you’re suffering from these shutdowns too, you might want to take a look at.
http://www.linux-phc.org
Enjoy
August 26th, 2009
wow, thanks loomsen. That’s an interesting piece of info. It is interesting in two regards. First I didn’t know that laptop manufacturers can have such a major oversight and second that I thought undervolting was only possible through BIOS. I’ll definitely try it out. Thanks once again.
September 12th, 2009
The problem you described here is actually due to a bug in virtual box that has to do with the CPU affinity. In other words virtual box does not like switching between multiple cores.
By starting a second virtual box instance you are basically doing the same thing as just setting the CPU affinity for the process. If you are running virtual box from a GNU/Linux host, you can use taskset to set the CPU affinity.
December 2nd, 2009
Thanks man, I found a lot of posts about the subject but only your fix my problem… Also I’m too lazy and Linux noob to rebuild my kernel. So it’s a quick and dirty fix that works great
December 5th, 2009
Amazing, that fix works!
I tried setting the processor affinity of the virtualbox processes to one CPU, but it doesn’t make a difference. As soon as I started up a “dummy” guest instance… CPU goes to almost 0%
January 8th, 2010
I solved the issue by:
- changing my Windows XP installation to single core (using HALu: http://www.hardware.info/en-US/news/ym2cmZqYwp2a/Problems_updating_to_a_dualcore_CPU_Not_anymore/)
- shutdown Windows XP
- change the number of processors in VirtualBox from 2 to 1