High CPU-usage with VirtualBox on dual-core CPU while Guest(s) are idle
Amain on October 8th, 2009
I installed VirtualBox 3.0.6 and installed a couple of Guest OS’es. During the installation of a OEL 5.3 Linux as Guest, I discovered that the VirtualBox process for this Guest on the host was consuming between 55% and 85% of CPU usage, even though the Guest’s top showed that the Guest was idle.
It seems to be that VirtualBox has a problem switching between multiple core’s on the host and therefore causing high CPU load on the host, even while the Guests are idle. This is of course not good. There are a couple of solutions / workarounds:
- Adjust the CPU affinity for the Guest’s VirtualBox process
- Configure multiple CPU’s in the Guest’s VM settings
- Run another small idle/dummy Guest VM besides the one you want to use
I use the second option with success. I have an Intel(R) Core(TM)2 Duo CPU laptop and I assigned 2 CPU’s in the Guest’s settings and now the host CPU usage is back to normal, luckily. Also note that it’ has been reported, that VirtualBox is not very well handling tickless kernels ( CONFIG_NO_HZ=y ) or has higher CPU usage with high resolution timers like 1000 Hz ( CONFIG_HZ_1000 ). Ubuntu Jaunty has for example a tickless kernel and OEL 5.3 ahs a timer tick of 1000 Hz.
Links: