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?
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).
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.
Hi,
[ rolling back the thread ]
< <type arch='x86_64' machine='rhel6.2.0'>hvm</type>
<type arch='x86_64' machine='rhel6.1.0'>hvm</type>
Here it is. Change the machine type to 6.2.0 for fedora and it will fly. usb suspend support is new in rhel 6.2. With the 6.1 machine type even the 6.2 qemu-kvm version behaves like the 6.1 one for compatibility reasons.
cheers, Gerd
On 07/19/2012 09:26 AM, Gerd Hoffmann wrote:
Hi,
[ rolling back the thread ]
< <type arch='x86_64' machine='rhel6.2.0'>hvm</type>
<type arch='x86_64' machine='rhel6.1.0'>hvm</type>
Here it is. Change the machine type to 6.2.0 for fedora and it will fly. usb suspend support is new in rhel 6.2. With the 6.1 machine type even the 6.2 qemu-kvm version behaves like the 6.1 one for compatibility reasons.
Ah, great catch Gerd! I've closed out the udev bug that Orion filed.
- Cole
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?
It appears that toggling the Autosuspend for USB device QEMU USB Tablet [QEMU 0.12.1] tunable has a big effect and brings it in line with SL6.
SL6: usb 1-1: Product: QEMU USB Tablet input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input4 generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level auto
F17: [ 3.015642] usb 1-1: Product: QEMU USB Tablet [ 3.117125] input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input3 [ 3.117827] generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level on
So it appears that SL6 is setting to auto automatically, but Fedora is not. I wonder why.
On 07/18/2012 11:17 AM, Orion Poplawski 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?
It appears that toggling the Autosuspend for USB device QEMU USB Tablet [QEMU 0.12.1] tunable has a big effect and brings it in line with SL6.
SL6: usb 1-1: Product: QEMU USB Tablet input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input4 generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level auto
F17: [ 3.015642] usb 1-1: Product: QEMU USB Tablet [ 3.117125] input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input3 [ 3.117827] generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level on
So it appears that SL6 is setting to auto automatically, but Fedora is not. I wonder why.
Hmm, could you please open a bug for that? I guess against F17 qemu for now, might be kernel or udev though. I think this is a regression from previous releases, tablet autosuspend is supposed to work out of the box.
Thanks, Cole
On 07/18/2012 11:04 AM, Cole Robinson wrote:
On 07/18/2012 11:17 AM, Orion Poplawski 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?
It appears that toggling the Autosuspend for USB device QEMU USB Tablet [QEMU 0.12.1] tunable has a big effect and brings it in line with SL6.
SL6: usb 1-1: Product: QEMU USB Tablet input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input4 generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level auto
F17: [ 3.015642] usb 1-1: Product: QEMU USB Tablet [ 3.117125] input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input3 [ 3.117827] generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level on
So it appears that SL6 is setting to auto automatically, but Fedora is not. I wonder why.
Hmm, could you please open a bug for that? I guess against F17 qemu for now, might be kernel or udev though. I think this is a regression from previous releases, tablet autosuspend is supposed to work out of the box.
Thanks, Cole
Filed against udev since that is where it was fixed in EL6.
https://bugzilla.redhat.com/show_bug.cgi?id=841368
On 07/18/2012 10:12 PM, Orion Poplawski wrote:
On 07/18/2012 11:04 AM, Cole Robinson wrote:
On 07/18/2012 11:17 AM, Orion Poplawski 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?
It appears that toggling the Autosuspend for USB device QEMU USB Tablet [QEMU 0.12.1] tunable has a big effect and brings it in line with SL6.
SL6: usb 1-1: Product: QEMU USB Tablet input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input4 generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level auto
F17: [ 3.015642] usb 1-1: Product: QEMU USB Tablet [ 3.117125] input: QEMU 0.12.1 QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/input/input3 [ 3.117827] generic-usb 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Pointer [QEMU 0.12.1 QEMU USB Tablet] on usb-0000:00:01.2-1/input0
# cat /sys/devices/pci0000:00/0000:00:01.2/usb1/power/autosuspend 2 # cat /sys/devices/pci0000:00/0000:00:01.2/usb1/1-1/power/level on
So it appears that SL6 is setting to auto automatically, but Fedora is not. I wonder why.
Hmm, could you please open a bug for that? I guess against F17 qemu for now, might be kernel or udev though. I think this is a regression from previous releases, tablet autosuspend is supposed to work out of the box.
Thanks, Cole
Filed against udev since that is where it was fixed in EL6.
Gerd, any idea why autosuspend isn't working in F17 guest?
Thanks, Dor
Hi,
Hmm, could you please open a bug for that? I guess against F17 qemu for now, might be kernel or udev though. I think this is a regression from previous releases, tablet autosuspend is supposed to work out of the box.
Thanks, Cole
Filed against udev since that is where it was fixed in EL6.
Gerd, any idea why autosuspend isn't working in F17 guest?
Hmm, no idea, works just fine in my F17 guest.
udev handles it, rules are upstream so every linux guest with a recent udev version should work fine out-of-the-box, F17 has the rules here:
/usr/lib/udev/rules.d/42-usb-hid-pm.rules
cheers, Gerd