#604240 Centos 5.5 guest hogs CPU

Package:
qemu-kvm
Source:
qemu
Submitter:
Alex
Date:
2025-07-28 19:57:08 UTC
Severity:
wishlist
Tags:
#604240#5
Date:
2010-11-21 11:25:49 UTC
From:
To:
Hi,

After booting a recently-installed Centos 5.5 i686 guest (with no additional
packages), qemu-kvm hogs the host's cpu. Inside the guest, there's no CPU
activity.

If I disable APIC in the guest, this does not happen.

Thanks,

Alex

#604240#10
Date:
2010-11-21 12:37:55 UTC
From:
To:
tags 604240 + unreproducible moreinfo
thanks

21.11.2010 14:25, Alex wrote:

I can't reproduce this in my test install.  I bothered
to d/load centOS 5.5 cd and installed it in kvm - it
works correctly.  So you'll need to provide information
about how to reproduce this problem.  Especially the
kvm command line you're using, your host (32 or 64 bits),
actual way how you installed centOS.

One of the possibilities is actually some bug in CentoOS
(RedHat) kernel - their kernel is too old and too messy.
I'm afraid even if I'll be able to reproduce the issue,
I'll have to close this bugreport (or tag it with 'wontfix') --
the mess they do in RH kernels is basically unrepairable.

/mjt

#604240#17
Date:
2010-11-21 12:59:42 UTC
From:
To:
  OK, no worries.

My QEMU commandline is:

/usr/bin/kvm -S -M pc-0.12 -cpu qemu32 -enable-kvm -m 512 -smp
1,sockets=1,cores=1,threads=1 -name noctem -uuid
1bccb2d6-edbc-3831-7190-39a8b5c34b4a -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/noctem.monitor,server,nowait -mon
chardev=monitor,mode=readline -rtc base=utc -boot c -drive
file=/var/lib/libvirt/images/noctem.img,if=none,id=drive-virtio-disk0,boot=on,format=raw
-device 
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
-drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw 
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 
-device 
virtio-net-pci,vlan=0,id=net0,mac=52:54:00:87:1a:e1,bus=pci.0,addr=0x3
-net tap,fd=59,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device 
isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

My installation of CentOS was quite standard, I unselected the Gnome
Desktop task selection (so I installed the bare install). My host is:

# uname -a
Linux case 2.6.32-4-amd64 #1 SMP Tue Apr 6 08:21:34 UTC 2010 x86_64
GNU/Linux

userland is 32 bits, although I'm not sure why that does not show in uname.

I have a workaround for the bug (disabling APIC), so if the bug has to
be closed that's OK for me (and this bug will show up in Google if
someone stumbles across the same problem).

Thanks for your time,

Àlex

#604240#22
Date:
2010-11-21 15:50:42 UTC
From:
To:
tags 604240 - moreinfo unreproducible
tags 604240 + confirmed
severity 604240 wishlist
retitle 604240 Centos 5.5 guest hogs CPU
thanks

21.11.2010 15:59, Alex wrote:
...

Ok.  I was able to trigger this independently - indeed, guest eats CPU
on the host.  The situation becomes a bit better when booting it with
noapic, but it's not a solution unfortunately: it still uses 25..30%
host CPU time when idle (not 50% (of two cores) without noapic).

I tested qemu-kvm_0.13 too, and it shows the same effect.

This is most likely a bug in Redhat kernel.

I'll try to check other combinations of 32/64 host/guest if
time permits, but don't hold the breath - to me it's of low
priority.

For now I'll mark it as minor and confirmed.  Minor because it
works, just uses more CPU time on host than necessary.  Also
retitling - removing APIC reference, since while noapic helps
somwhat, it does not eliminate the issue still.

I don't plan to close the bug right away, just because maybe
there's something in kvm that can be changed.

Thanks!

#604240#35
Date:
2010-11-22 12:31:47 UTC
From:
To:
An update to this bugreport.

We tried triggering it on several machines, and discovered the following:

The high load on host is due to rhel/centos 5 kernel using 1000Hz timer
tick, and their kernel is not tickless.  The load will be higher or lower
depending on your host cpu speed, cpufreq profile and other factors like
that.

There's one machine I have, with a CPU similar to your (older Athlon X2,
Brisbane and the like, 64nm technology) -- Turion TL-52 (1.6GHz).  On
this CPU, CentOS behaves very unreliable, -- sometimes it stops (with 100%
cpu on host) during boot, sometimes during shutdown, sometimes during
regular operations.  The key difference (I think) of this machine from
all others is that it has unstable tsc, while on all others it's stable.
The behavour does not depend much on noapic guest setting, while it
seems it occurs a bit less frequently with noapic.  Were you able to boot
the guest at all, or does it stall on you and does not work?

The fact that if behaves badly on non-stable-tsc suggests it's a bug in
redhat kernel still - there were a few similar bugs fixed in recent
upstream (-stable included) kernels.

The same behavour is observed on qemu-kvm 0.12 and 0.13.

So I still think its redhat kernel bug, for now - preliminary.

Thanks!

/mjt

#604240#40
Date:
2010-11-22 19:30:08 UTC
From:
To:
  Hi,
Yup, I didn't even notice the problem until the CPU fans went into
overdrive.

Thank you for your time (however, note that this is not critical to me)

Cheers,

Alex

#604240#45
Date:
2012-01-29 22:42:52 UTC
From:
To:
tags 604240 + wontfix
thanks

Tagging as wontfix -- this is a problem in old kernels
(including those used in rhel/cenos 5.x), nothing qemu/kvm
can do about.

Thanks,

/mjt

#604240#50
Date:
2012-01-29 22:42:52 UTC
From:
To:
tags 604240 + wontfix
thanks

Tagging as wontfix -- this is a problem in old kernels
(including those used in rhel/cenos 5.x), nothing qemu/kvm
can do about.

Thanks,

/mjt