The problem
I was trying to run more than 8 Centos 5.3 virtual machines using VirtualBox 3 on Ubuntu 9.04 and I was running into high cpu load (80-90% cpu load when the virtual machines were idle).
The solution
After searching a bit around the web I've found a bugzilla thread where some people smarter than me figured out that the high cpu load was caused by the default CentOS 5 kernel settings.
Without going to technical (you can read the details in the bugzilla thread) here are the steps that you can use to fix the problem.
Step 1
Add the CentOS testing repository at the end of the /etc/yum.repos.d/CentOS-Base.repo
nano -w /etc/yum.repos.d/CentOS-Base.repo
paste the following repo and save
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
Step 2
Install the "fixed" kernel
yum install kernel-vm
Step 3
Edit grub.conf to boot into the new kernel automatically.
nano -w /etc/grub.conf
The newly installed kernel should be the first on the list.
You need to edit the grub.conf entry to say 0 instead of 1 (the first entry is 0, the second one is 1 etc.)
Step 4
Reboot into the new kernel
shutdown -r now
Resources
"..I've found a bugzilla
"..I've found a bugzilla thread.." -- the link to the bugzilla thread is broken, it leads back to this page itself.
Thanks ;) Updated the
Thanks ;) Updated the article.
Thx a lot. It has solved my
Thx a lot. It has solved my problem.