I've been using Oracle's VirtualBox for several months now. I'm really impressed with this product and it has helped me a lot to rapidly prototype some APEX concepts.
One thing that bothered me when I started using it was that no matter what my virtual machine was doing, VirtualBox was using a lot of the CPU on my laptop. This didn't matter if the virtual machine was idle or doing any processing. After some digging around I found this very helpful post on the Oracle forums: http://forums.oracle.com/forums/thread.jspa?messageID=9305831. As weird as it may sound the suggestion is to create and start a second, dummy, virtual machine. I was pleasantly surprised to see that it worked. The configuration that I used was: DOS as an OS. 4 MB of memory and a 4 MB hard drive. Disable all the extra stuff (network, audio, usb, etc).
Here are the screen shots of my CPU before and after I started the second, dummy, virtual machine:
Before:
After:
After starting the second virtual machine the CPU spiked for a few seconds then dropped significantly. Hopefully this issue will be fixed in a future version of VirtualBox but until then this is a very simple work around.
Good find Martin! I have never seen a performance problem with my Virtualbox on my laptop (i-720, 8gigs), but now I will look at the monitor to validate your findings.
ReplyDeleteWayne
I did not encounter this issue on an i-720 Win7 64bit host (8cpu,8gigs). But I did see it on a Pentium 4 (2cpu,3gigs) 32-bit host running CentOS 5.
ReplyDeleteIt's either a bug when running on a Linux host, or a bug on a "smaller" machine (ie 2 cpu).
I applied the dummy machine suggestion and my CPU dropped significantly. Now it is actually usable!
Wayne
... oh, and by the way, when I tested on my i720 laptop, I had 3 VMWare virtual machines running as well as the Virtualbox EL5 guest running. All four were running with 2gig memory, 2cpus. Not doing much mind you, but running just the same.
ReplyDeleteWayne
Doesn't work for me, I can still see high CPU even of I create a dummy machine and start it
ReplyDeleteYou may need to contact the VirtualBox team for additional support. Hopefully we won't see this issue in the next major release.
ReplyDeleteVersion 4.1 may resolve this issue. Please read the 4.1 beta release notes: http://forums.virtualbox.org/viewtopic.php?f=15&t=42688
ReplyDeleteNothing helped me except for disabling nested paging. System > Acceleration > untick enable nested paging. Using VB 4.1 on win 7 64, i7 8 gb vaio
ReplyDeleteThanks a lot Anonymous! I banged my head flat for a couple of month, unsuccessfully tried almost every workaround that's found on the net.
ReplyDeleteTesting dummy vms, VB versions from 3.2 to 4.1, changing of timers and some kernel parameters, number of cores, starting VMs in different orders/ways etc.
Disabling nested paging solved it for me instantly.
Thanks again, you saved my day (and month)!
Another way to kill your host with high cpu load, when running multiple virtualbox machines:
ReplyDelete“bridge a lot lof network interfaces”
Try disabling bridges and think again about any bridged network loops that might have existed.
I was getting 15-20% CPU utilization from Ubuntu 12.04 guests on OS X and none of the existing suggestions helped, but I did manage to fix it, added the details to the SuperUser Q&A: http://superuser.com/a/722446/113572
ReplyDelete