[fedora-virt] Different cpu usage between Fedora and SL6 guests
Orion Poplawski
orion at cora.nwra.com
Wed Jul 18 14:13:20 UTC 2012
On 07/17/2012 05:16 PM, Eric Blake wrote:
> On 07/17/2012 04:50 PM, Orion Poplawski wrote:
>> While staring at top on my SL6 kvm server waiting for it to crash, I
>> noticed that my idle Fedora kvm guests appear to be consuming between
>> 8-12% cpu while my idle SL6 guests appear to be consuming between 0.3-2%
>> cpu as shown in the qemu-kvm processes in top. In fact I have a Fedora
>> 17 instance running now with nothing but kernel processes and the
>> qemu-kvm process still shows it using 7-8% cpu.
>>
>> Does anyone have any insight as to why this would be the case?
>
> Could it be an issue of vnc vs. spice? It may help if you provide the
> 'virsh dumpxml $dom' of the two guests in question, to point out if any
> difference in configuration may be responsible. Also bear in mind that
> the virt stack strives for guest ABI compatibility - so a guest created
> 2 years ago will still use the defaults from 2 years ago, even if the
> defaults have since improved in the meantime for a guest created today.
> You can rewrite the XML, generally with no ill effects to a Linux
> guest, but at risk of having to revalidate a Windows guest (hence why
> the virt stack strives for stable ABI instead of auto-rewriting your
> guests to use latest-and-greatest defaults).
>
Using VNC for all. There is very little difference in the configuration. For
one example (drupal is SL6, mock1 is Fedora 17):
diff drupal.xml mock1.xml
1,6c1,6
< <domain type='kvm' id='1'>
< <name>drupal</name>
< <uuid>bfdc6b27-396d-83d7-0c91-8e610aa3a40d</uuid>
< <memory unit='KiB'>524288</memory>
< <currentMemory unit='KiB'>524288</currentMemory>
< <vcpu placement='static'>1</vcpu>
---
> <domain type='kvm' id='6'>
> <name>mock1</name>
> <uuid>bf102e31-36c5-d9bf-9000-29293e927fef</uuid>
> <memory unit='KiB'>2097152</memory>
> <currentMemory unit='KiB'>2097152</currentMemory>
> <vcpu placement='static'>4</vcpu>
8c8
< <type arch='x86_64' machine='rhel6.2.0'>hvm</type>
---
> <type arch='x86_64' machine='rhel6.1.0'>hvm</type>
24c24
< <source dev='/dev/vg_root/vm_drupal'/>
---
> <source dev='/dev/vg_root/vm_mock1'/>
34c34
< <mac address='40:00:00:00:00:10'/>
---
> <mac address='40:00:00:00:00:11'/>
36c36
< <target dev='vnet0'/>
---
> <target dev='vnet2'/>
42c42
< <source path='/dev/pts/1'/>
---
> <source path='/dev/pts/8'/>
46,47c46,47
< <console type='pty' tty='/dev/pts/1'>
< <source path='/dev/pts/1'/>
---
> <console type='pty' tty='/dev/pts/8'>
> <source path='/dev/pts/8'/>
55c55
< <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
---
> <graphics type='vnc' port='5902' autoport='yes' keymap='en-us'/>
67,68c67,68
< <label>system_u:system_r:svirt_t:s0:c288,c830</label>
< <imagelabel>system_u:object_r:svirt_image_t:s0:c288,c830</imagelabel>
---
> <label>system_u:system_r:svirt_t:s0:c129,c713</label>
> <imagelabel>system_u:object_r:svirt_image_t:s0:c129,c713</imagelabel>
All my other domains are "rhel6.1.0" and the SL6 one is fine.
At this point I would have to think it is differences in the guest kernels.
Not sure what the best way of tracing what the qmeu-kvm process is doing and
comparing them.
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA, Boulder Office FAX: 303-415-9702
3380 Mitchell Lane orion at nwra.com
Boulder, CO 80301 http://www.nwra.com
More information about the virt
mailing list