Page 1 of 1

50-100% Cpu time with centos guest

Posted: 5. Jun 2008, 22:37
by devent
Hi, I just wonder if it's normal that I get 50 to 100% CPU load while running CentOS 5 32bit in Vbox.

I use the 1.6 Beta and 2.6.25-4.slh.8-sidux-686 #1 SMP PREEMPT Wed Jun 4 15:12:53 UTC 2008 i686 GNU/Linux host system. And the CentOS kernel is 1.6.18-53.1.21.el5.

The guest system is 99% idle. But the host get from 50 to 100% CPU load. I also have a network bridge for the guest.

I just tested it with Ubuntu 6.06, kernel 2.6.15-51-server. There I have 4 to 5% Cpu load on the host system.

Maybe it's because of the enabled PEA?

Tested on Ubuntu Server 8, it's normal. 5% Cpu load on host. (the guest is 2.6.24-18-server)

Posted: 7. Jun 2008, 20:11
by devent
Well I just installed Vbox 1.6.2 and tested it with CentOs. It's the same, 50% to 100% CPU load while the guest CentOS is in idle.

Ubuntu Server is normal, so it's not the enabled PEA.
Have anyone CentOS as guest like me?

Posted: 5. Aug 2008, 20:29
by landtuna
It's a little late, but, yes, I have this problem, too. :)

Posted: 5. Aug 2008, 22:15
by landtuna
Try adding divider=10 to your kernel parameters.

Posted: 17. Sep 2008, 09:17
by h1d
I put the divider line to grub.conf and it's now at 35% when it was over 50% CPU usage when idle, but this still needs a better treatment, anyone got any clue?

Seeing same issue with CentOS 5.2 guest

Posted: 30. Sep 2008, 20:31
by kwanlowe
Just wanted to add that I'm seeing the same issue with a CentOS 5.2 host and CentOS 5.2 guest, both 32-bit. One processor assigned to the VM (on the Dual Core host) gets pegged completely (so 50% overall).

It doesn't happen immediately when I start the VM, however.

Re: Seeing same issue with CentOS 5.2 guest

Posted: 30. Sep 2008, 20:43
by stephanecharette
kwanlowe wrote:Just wanted to add that I'm seeing the same issue with a CentOS 5.2 host and CentOS 5.2 guest, both 32-bit. One processor assigned to the VM (on the Dual Core host) gets pegged completely (so 50% overall).
All modern OSes know to yield, right? That wouldn't be the problem? (Asking SUN/VB, not the people experiencing the problem.)

CentOS must have "top" and perhaps something graphical like System Monitor. If you run "/usr/bin/top" or "/usr/bin/gnome-system-monitor" within the guest, what process is hogging the cpu?

Stéphane

VM is idle

Posted: 1. Oct 2008, 03:53
by kwanlowe
All modern OSes know to yield, right? That wouldn't be the problem? (Asking SUN/VB, not the people experiencing the problem.)

CentOS must have "top" and perhaps something graphical like System Monitor. If you run "/usr/bin/top" or "/usr/bin/gnome-system-monitor" within the guest, what process is hogging the cpu?
That's part of the issue. The vm is completely dormant. The idle process witin the VM is at 99% but the host shows the CPU pegged from the VirtualBox instance. It's actually over the 50% whenever anything is occurring in the VM.

A strace on the host VirtualBox process doesn't reveal a whole bunch. A few poll() and clock_gettime() but nothing to indicate why it's spinning so hard.

Part of the problem does appear to be that the cpufreq daemon does not load under VirtualBox. On the host we can see:

[root@ice9 ~]# lsmod|grep ^cpu
cpufreq_powersave 6209 0
cpufreq_ondemand 12493 0

Under the VM however, the the acpi_cpufreq module does not load (No such device). This may not be possible under the VM, but not sure at this point.

I also checked some of the default kernel configs for that particular CentOS kernel, particularly the CONFIG_APM_CPU_IDLE flag (which is set).

This said, I have an equivalent machine running under Xen and VMWare that don't have this problem so it appears to be specific to VB versus some virtual machine configuration. The issue is not confined to the Core2Duo chipset either. VirtualBox running on an AMD XP2000+ (single core) shows 75% CPU utilization on the host when the VM is completely idle.

Posted: 1. Oct 2008, 11:28
by Sasquatch
The VM is running idle, does it generate any network traffic like an IM client? What happens if you start a second VM set to NAT networking and let that run idle.

Posted: 1. Oct 2008, 16:58
by kwanlowe
The VM is running idle, does it generate any network traffic like an IM client? What happens if you start a second VM set to NAT networking and let that run idle.
No, absolutely nothing is happening in the VM, network or otherwise. In fact, I also noticed that when I shutdown the VM, after it was stopped at the "System Halted." message, it was still chewing CPU. In other words, there was no guest OS interaction at all.

Posted: 13. Oct 2008, 12:26
by sej7278
i've found the 100% cpu issue on centos 4.7 and xp64, however not on centos 5.2 or win2003 guests (fedora9 core2quad 64-bit and centos 5.2 athlonxp 32-bit hosts).

its obviously quite an issue judging by the number of threads on here about it, but there seems to be no response/fix from sun - only a few hacks that help [a little] from end users - like tickless or acpi kernels in the guests; hell if i wanted to have to hack at the guest kernel i would have gone with xen!

Posted: 14. Oct 2008, 00:32
by Sasquatch
There is another problem to this issue. I didn't have this problem before. Now, I seem to get it every now and then, where I have my VM running idle and my CPU is 50% (one core loaded). This makes it very hard to track it down.

Posted: 14. Oct 2008, 00:45
by sej7278
setting the "divider=10" kernel parameter on my [centos 4.7] guest's grub.conf seems to have fixed it for me - disabling acpid and cpuspeed did nothing.

Posted: 14. Oct 2008, 10:16
by fixedwheel
sej7278 wrote:disabling acpid and cpuspeed did nothing.
did you try acpi=off as kernel parameter in /boot/grub/menu.lst (or grub.conf whatever...)?

Re: 50-100% Cpu time with centos guest

Posted: 1. Sep 2009, 19:15
by ScottD
I see a single CPU saturated when I run a single guest,
even when that guest is doing no more than waiting at
the install prompt. I'm running a quad-core AMD, and
ubuntu 9.04. The system monitor shows one CPU pegged
(with occasional swaps to a different CPU). In trying to
track down the problem, I've discovered that adding
a second instance doing nothing brings all the core activity
down to near-nothing.

There is definitely something troublesome going on, but I
have an adequate work-around (always open two guests).