Bug 508109

Summary: qemu-kvm cpu usage spikes on F11 host with idle centos 5.3 guest
Product: [Fedora] Fedora Reporter: Dennis Jacobfeuerborn <dennisml>
Component: qemuAssignee: Glauber Costa <gcosta>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dwmw2, gcosta, itamar, jaswinder, markmc, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-07 10:46:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
VM performance details screenshot
none
oprofile data none

Description Dennis Jacobfeuerborn 2009-06-25 16:49:02 UTC
Created attachment 349426 [details]
VM performance details screenshot

When I run a centos 5.3 x86_64 guest on my F11 x86_64 system with kvm I see the qemu-kvm process cpu usage jump to ~20% (in top, ~50% in virtual-machine-manager) every few seconds even though the guest is completely idle (I even disabled the HAL polling for /dev/hdc). Running a "top" using the console the only process that show up as using cpu time is top itself.

I attached a screenshot which show the behaviour pretty well.

This is the command line the process is running with (started from virtual-machine-manager):

/usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name centos5 -uuid 2754a928-6d0c-7833-e0e6-c717de291258 -monitor pty -pidfile /var/run/libvirt/qemu//centos5.pid -boot c -drive file=/var/lib/libvirt/images/centos5.img,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:27:40:99,vlan=0 -net tap,fd=16,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb -vnc 127.0.0.1:0

The VM is configured with 1 VCPU and 512mb ram. I also shut down the network interface in the guest using "ifdown eth0" but that didn't change anything.

The host system is a fresh F11 x86_64 install running on a system with a "AMD Athlon(tm) 64 X2 Dual Core Processor 4200+" CPU and 4gb of ram.

The kernel and qemu versions are:

kernel-2.6.29.4-167.fc11.x86_64
qemu-kvm-0.10.5-3.fc11.x86_64

Comment 1 Dennis Jacobfeuerborn 2009-06-25 22:44:15 UTC
Created attachment 349483 [details]
oprofile data

I attached some oprofile profiling data. I'm not very familiar with the proper usage of oprofile but maybe that data can help shed some light on the source of the problem.

Comment 2 Mark McLoughlin 2009-07-03 07:30:33 UTC
Hard to tell what's going on here

Does booting the guest with divider=10 help at all?

Comment 3 Dennis Jacobfeuerborn 2009-07-04 22:31:59 UTC
After firing up the VM today the major peaks on the performance graph no longer appeared, only the smaller ones. I updated the machine in the mean time so that might have something to do with it.

Adding "divider=10" further reduces both the value and the frequency of the minor peaks.

Comment 4 Mark McLoughlin 2009-08-07 10:46:10 UTC
Thanks for the update

This just sounds like normal behaviour - the guest may be idle, but it is still handling timer interrupts etc.

Closing, but do re-open if you think there's a genuine qemu/kvm bug here