VirtualBox CPU Usage on Debian Host OS
Posted: 25. Mar 2009, 01:19
Hi Guys,
First good job on coming into the Virtualization market, the product seems to be maturing well.
VMware obviously as we all know was the big player in this field for a long time and still are in the Enterprise space, however VirtualBox is showing a lot of potential.
My experience of VirtualBox in the beginning was it was outperforming VMware Server 1.X however on closer inspection I think in heavy CPU load environments it doesn't cope as well.
For reference:
Running Debian (Lenny) 5.0
VirtualBox 2.1.4r42893
Kernel (Latest from kernel.org) 2.6.28.8
Checking the Kernel config file:
CONFIG_NO_HZ=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_MACHZ_WDT=m
So it looks like the kernel is tickless? And running 250Hz as opposed to 1000Hz but slightly above the seemingly recommended 100Hz.
My Setup:
I use a raw disk setup which was working ok in VMware Server 1.0.4 since upgrading my Kernel (while upgrading to Lenny) some things broke including VMware as it doesn't compile easily on the newer kernels.
I looked at VMware Server 2.X and they remove raw disk support at this time? That was pretty bad.
So I decided to try VirtualBox, one of my disk-image based vmdk's worked fine which ran Linux. I tried to boot my raw disk though and it would say "OS Not found" I realize I would probably have to repair install but I figured it would at least boot the OS and blue screen.
So I ran a repair install which didn't work. I then went through with a fresh install using the same partition and installation over-writing it, this also did not work...
I had to remove the partitions and start again to get up and running, not sure why the raw disk of VMware vs. raw disk of VirtualBox would have slightly different partition table structures?
In any case I got the OS loaded and started running some applications, the host CPU usage was hitting 100% for the application in "top" and the fans in the server were going crazy.
I did a lot of reading around including the "HAL" changes to Single processor, they did not help. One I did read from way back was loading a second virtual machine makes VirtualBox behave. I thought well that was probably fixed by now?
For the hell of it I loaded up the second VirtualBox and paused it and my CPU usage dropped under real load to around 30-40%
So loading the second VirtualBox instance for some reason made the CPU usage normal? Hopefully this gets fixed soon.
On to my findings anyway:
Under no load the Virtualbox seems fairly fast, responsive and I like the fact that using VRDP you can achieve better resolutions than with VMware relying on the host graphic card or similar?
However I found that opening programs caused bigger CPU spikes than VMware Server seemed to on the Host and when you start to put the guest under load it in my opinion starts under-performing VMware Server. When there is a lot of intensive CPU operations happening in the guest things start to slow down a lot where as in VMware Server it seemed usable.
Conclusion:
I thought I'd post my findings of where things need fixing and improvements and how I found VirtualBox stacking up against VMware Server. At this point unfortunately I will probably have to look back into VMware Server and the 1.X branch because yeah no raw disk support in 2.X
I do look forward to seeing how VirtualBox progresses though and it seems to run quite well in most things.
First good job on coming into the Virtualization market, the product seems to be maturing well.
VMware obviously as we all know was the big player in this field for a long time and still are in the Enterprise space, however VirtualBox is showing a lot of potential.
My experience of VirtualBox in the beginning was it was outperforming VMware Server 1.X however on closer inspection I think in heavy CPU load environments it doesn't cope as well.
For reference:
Running Debian (Lenny) 5.0
VirtualBox 2.1.4r42893
Kernel (Latest from kernel.org) 2.6.28.8
Checking the Kernel config file:
CONFIG_NO_HZ=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_MACHZ_WDT=m
So it looks like the kernel is tickless? And running 250Hz as opposed to 1000Hz but slightly above the seemingly recommended 100Hz.
My Setup:
I use a raw disk setup which was working ok in VMware Server 1.0.4 since upgrading my Kernel (while upgrading to Lenny) some things broke including VMware as it doesn't compile easily on the newer kernels.
I looked at VMware Server 2.X and they remove raw disk support at this time? That was pretty bad.
So I decided to try VirtualBox, one of my disk-image based vmdk's worked fine which ran Linux. I tried to boot my raw disk though and it would say "OS Not found" I realize I would probably have to repair install but I figured it would at least boot the OS and blue screen.
So I ran a repair install which didn't work. I then went through with a fresh install using the same partition and installation over-writing it, this also did not work...
I had to remove the partitions and start again to get up and running, not sure why the raw disk of VMware vs. raw disk of VirtualBox would have slightly different partition table structures?
In any case I got the OS loaded and started running some applications, the host CPU usage was hitting 100% for the application in "top" and the fans in the server were going crazy.
I did a lot of reading around including the "HAL" changes to Single processor, they did not help. One I did read from way back was loading a second virtual machine makes VirtualBox behave. I thought well that was probably fixed by now?
For the hell of it I loaded up the second VirtualBox and paused it and my CPU usage dropped under real load to around 30-40%
So loading the second VirtualBox instance for some reason made the CPU usage normal? Hopefully this gets fixed soon.
On to my findings anyway:
Under no load the Virtualbox seems fairly fast, responsive and I like the fact that using VRDP you can achieve better resolutions than with VMware relying on the host graphic card or similar?
However I found that opening programs caused bigger CPU spikes than VMware Server seemed to on the Host and when you start to put the guest under load it in my opinion starts under-performing VMware Server. When there is a lot of intensive CPU operations happening in the guest things start to slow down a lot where as in VMware Server it seemed usable.
Conclusion:
I thought I'd post my findings of where things need fixing and improvements and how I found VirtualBox stacking up against VMware Server. At this point unfortunately I will probably have to look back into VMware Server and the 1.X branch because yeah no raw disk support in 2.X
I do look forward to seeing how VirtualBox progresses though and it seems to run quite well in most things.