[libvirt-users] Processor usage of qemu process.

I have been using libvirt for a while now with some linux guest installed. And everything has been working great. I've got a nice new (used) HP virtual host with 12 x dual core and 48Gb mem. My Windows servers are getting old, so I found it was time to take the next step and also virtualise my Windows systems. Now I've got two Windows guests on my new host: - A Windows 8.1 which runs a Autodesk Job Processor - A Windows Server 2012 R2 which runs a Pervasive SQL, Autodesk Vault Server (MSSQL, IIS), Autodesk license server,... The first is constanly using 30% host-CPU and the second one is using 50% host-CPU. Both guests are using <5% guest CPU... (Host system load is between 0.1 and 0.3...) Is it normal Windows guests take up 30% to 50% host CPU resources? The Windows 8.1 is actualy a simpel PC with almost no activity... Version: QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.10), Copyright (c) 2003-2008 Fabrice Bellard

I found a fix for the Windows 8.1 guest by changing the xml like: <model type='vmvga' vram='1048576' heads='1'/> Instead of <model type='vga' vram='1048576' heads='1'/> If someone knows a fix for the Windows Server 2015 R2 guest, I would appreciate it... -----Oorspronkelijk bericht----- Van: Dominique Ramaekers Verzonden: donderdag 12 maart 2015 19:17 Aan: libvirt-users@redhat.com Onderwerp: Processor usage of qemu process. I have been using libvirt for a while now with some linux guest installed. And everything has been working great. I've got a nice new (used) HP virtual host with 12 x dual core and 48Gb mem. My Windows servers are getting old, so I found it was time to take the next step and also virtualise my Windows systems. Now I've got two Windows guests on my new host: - A Windows 8.1 which runs a Autodesk Job Processor - A Windows Server 2012 R2 which runs a Pervasive SQL, Autodesk Vault Server (MSSQL, IIS), Autodesk license server,... The first is constanly using 30% host-CPU and the second one is using 50% host-CPU. Both guests are using <5% guest CPU... (Host system load is between 0.1 and 0.3...) Is it normal Windows guests take up 30% to 50% host CPU resources? The Windows 8.1 is actualy a simpel PC with almost no activity... Version: QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.10), Copyright (c) 2003-2008 Fabrice Bellard

On Thu, Mar 12, 2015 at 07:16:56PM +0100, Dominique Ramaekers wrote:
I have been using libvirt for a while now with some linux guest installed. And everything has been working great.
I've got a nice new (used) HP virtual host with 12 x dual core and 48Gb mem. My Windows servers are getting old, so I found it was time to take the next step and also virtualise my Windows systems.
Now I've got two Windows guests on my new host: - A Windows 8.1 which runs a Autodesk Job Processor - A Windows Server 2012 R2 which runs a Pervasive SQL, Autodesk Vault Server (MSSQL, IIS), Autodesk license server,...
The first is constanly using 30% host-CPU and the second one is using 50% host-CPU. Both guests are using <5% guest CPU...
(Host system load is between 0.1 and 0.3...)
Is it normal Windows guests take up 30% to 50% host CPU resources? The Windows 8.1 is actualy a simpel PC with almost no activity...
Version: QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.10), Copyright (c) 2003-2008 Fabrice Bellard
If would be helpful if you showed the XML config file for your guests, so we can see what hardware you've configured. Hardware choices can make a big difference to guest performance. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Dear Daniel, my XML's: Note: It seems I was to quick, the Windows 8.1 isn't fixed... Windows Server 2015 R2 <domain type='kvm' id='146'> <name>CmsrvAPP2</name> <uuid>02c5daef-662a-85ba-7291-485118badc64</uuid> <memory unit='KiB'>3149824</memory> <currentMemory unit='KiB'>3149824</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Westmere</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='rdtscp'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='pcid'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='monitor'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/virtiodrivers.iso'/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/WIN2012R2.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <shareable/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/CmsrvAPP2.raw'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:d2:40:25'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-02c5daef-662a-85ba-7291-485118badc64</label> <imagelabel>libvirt-02c5daef-662a-85ba-7291-485118badc64</imagelabel> </seclabel> </domain> Windows 8.1 <domain type='kvm' id='147'> <name>PCVIRT1</name> <uuid>2c9c04d7-f86d-df12-da9f-9847ac8b994f</uuid> <description>Job-processor van Autodesk. Deze PC zal periodiek taken opvragen bij Autodesk Vault en deze taken vervolgens uitvoeren.</description> <memory unit='KiB'>3145728</memory> <currentMemory unit='KiB'>524288</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>3</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu> <topology sockets='1' cores='3' threads='1'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/PCVIRT1.raw'/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:bb:7b:4e'/> <source bridge='br0'/> <target dev='vnet2'/> <model type='rtl8139'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/3'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/3'> <source path='/dev/pts/3'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <video> <model type='vmvga' vram='1048576' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-2c9c04d7-f86d-df12-da9f-9847ac8b994f</label> <imagelabel>libvirt-2c9c04d7-f86d-df12-da9f-9847ac8b994f</imagelabel> </seclabel> </domain> -----Oorspronkelijk bericht----- Van: Daniel P. Berrange [mailto:berrange@redhat.com] Verzonden: vrijdag 13 maart 2015 10:24 Aan: Dominique Ramaekers CC: libvirt-users@redhat.com Onderwerp: Re: [libvirt-users] Processor usage of qemu process. On Thu, Mar 12, 2015 at 07:16:56PM +0100, Dominique Ramaekers wrote:
I have been using libvirt for a while now with some linux guest installed. And everything has been working great.
I've got a nice new (used) HP virtual host with 12 x dual core and 48Gb mem. My Windows servers are getting old, so I found it was time to take the next step and also virtualise my Windows systems.
Now I've got two Windows guests on my new host: - A Windows 8.1 which runs a Autodesk Job Processor - A Windows Server 2012 R2 which runs a Pervasive SQL, Autodesk Vault Server (MSSQL, IIS), Autodesk license server,...
The first is constanly using 30% host-CPU and the second one is using 50% host-CPU. Both guests are using <5% guest CPU...
(Host system load is between 0.1 and 0.3...)
Is it normal Windows guests take up 30% to 50% host CPU resources? The Windows 8.1 is actualy a simpel PC with almost no activity...
Version: QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.10), Copyright (c) 2003-2008 Fabrice Bellard
If would be helpful if you showed the XML config file for your guests, so we can see what hardware you've configured. Hardware choices can make a big difference to guest performance. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Fri, Mar 13, 2015 at 10:32:14AM +0100, Dominique Ramaekers wrote:
Dear Daniel, my XML's:
Note: It seems I was to quick, the Windows 8.1 isn't fixed...
Windows Server 2015 R2
<domain type='kvm' id='146'> <name>CmsrvAPP2</name> <uuid>02c5daef-662a-85ba-7291-485118badc64</uuid> <memory unit='KiB'>3149824</memory> <currentMemory unit='KiB'>3149824</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Westmere</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='rdtscp'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='pcid'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='monitor'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/virtiodrivers.iso'/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/WIN2012R2.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <shareable/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/CmsrvAPP2.raw'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:d2:40:25'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-02c5daef-662a-85ba-7291-485118badc64</label> <imagelabel>libvirt-02c5daef-662a-85ba-7291-485118badc64</imagelabel> </seclabel> </domain>
The USB tablet could be a culprint, as could the choice of video mode. I'd suggest that you want to install the QXL video driver, and setup SPICE instead of VNC, along with the SPICE guest agent. This gives a much better performing graphics layer, and better performing mouse. instead of the USB tablet which is known to have high CPU cost. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Fri, Mar 13, 2015 at 12:35 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Fri, Mar 13, 2015 at 10:32:14AM +0100, Dominique Ramaekers wrote:
Dear Daniel, my XML's:
Note: It seems I was to quick, the Windows 8.1 isn't fixed...
Windows Server 2015 R2
<domain type='kvm' id='146'> <name>CmsrvAPP2</name> <uuid>02c5daef-662a-85ba-7291-485118badc64</uuid> <memory unit='KiB'>3149824</memory> <currentMemory unit='KiB'>3149824</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Westmere</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='rdtscp'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='pcid'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='monitor'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/virtiodrivers.iso'/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/WIN2012R2.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <shareable/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/CmsrvAPP2.raw'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:d2:40:25'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-02c5daef-662a-85ba-7291-485118badc64</label> <imagelabel>libvirt-02c5daef-662a-85ba-7291-485118badc64</imagelabel> </seclabel> </domain>
The USB tablet could be a culprint, as could the choice of video mode.
I'd suggest that you want to install the QXL video driver, and setup SPICE instead of VNC, along with the SPICE guest agent. This gives a much better performing graphics layer, and better performing mouse. instead of the USB tablet which is known to have high CPU cost.
Regards, Daniel
There is none of enlightenment timer features enabled, I`d suggest to start fixing the issue by adding them in the config. USB tablet is a great problem too for a generated additional workload in idle, though usb3 tablet connection results in much lower cpu consumption than usb2.

Spice seems to be doing the trick... Thanks a lot! The tablet isn't removed or changed yet. I'll first do a follow up of the spice before doing that... How do I enable the enlightenment timer feature? I can't seem to find it in the xml-doc's... -----Oorspronkelijk bericht----- Van: Andrey Korolyov [mailto:andrey@xdel.ru] Verzonden: vrijdag 13 maart 2015 10:59 Aan: Daniel P. Berrange CC: Dominique Ramaekers; libvirt-users@redhat.com Onderwerp: Re: [libvirt-users] Processor usage of qemu process. On Fri, Mar 13, 2015 at 12:35 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Fri, Mar 13, 2015 at 10:32:14AM +0100, Dominique Ramaekers wrote:
Dear Daniel, my XML's:
Note: It seems I was to quick, the Windows 8.1 isn't fixed...
Windows Server 2015 R2
<domain type='kvm' id='146'> <name>CmsrvAPP2</name> <uuid>02c5daef-662a-85ba-7291-485118badc64</uuid> <memory unit='KiB'>3149824</memory> <currentMemory unit='KiB'>3149824</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Westmere</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='rdtscp'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='pcid'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='monitor'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/virtiodrivers.iso'/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/WIN2012R2.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <shareable/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/CmsrvAPP2.raw'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:d2:40:25'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-02c5daef-662a-85ba-7291-485118badc64</label> <imagelabel>libvirt-02c5daef-662a-85ba-7291-485118badc64</imagelabel> </seclabel> </domain>
The USB tablet could be a culprint, as could the choice of video mode.
I'd suggest that you want to install the QXL video driver, and setup SPICE instead of VNC, along with the SPICE guest agent. This gives a much better performing graphics layer, and better performing mouse. instead of the USB tablet which is known to have high CPU cost.
Regards, Daniel
There is none of enlightenment timer features enabled, I`d suggest to start fixing the issue by adding them in the config. USB tablet is a great problem too for a generated additional workload in idle, though usb3 tablet connection results in much lower cpu consumption than usb2.


On Fri, Mar 13, 2015 at 11:22:45AM +0100, Dominique Ramaekers wrote:
Spice seems to be doing the trick... Thanks a lot!
The tablet isn't removed or changed yet. I'll first do a follow up of the spice before doing that...
Assuming you've enabled the SPICE guest agent, then it should not use the USB tablet, even if it is present. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Fri, Mar 13, 2015 at 12:58:32PM +0300, Andrey Korolyov wrote:
On Fri, Mar 13, 2015 at 12:35 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Fri, Mar 13, 2015 at 10:32:14AM +0100, Dominique Ramaekers wrote:
Dear Daniel, my XML's:
Note: It seems I was to quick, the Windows 8.1 isn't fixed...
Windows Server 2015 R2
<domain type='kvm' id='146'> <name>CmsrvAPP2</name> <uuid>02c5daef-662a-85ba-7291-485118badc64</uuid> <memory unit='KiB'>3149824</memory> <currentMemory unit='KiB'>3149824</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Westmere</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='rdtscp'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='pcid'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='monitor'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/virtiodrivers.iso'/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/WIN2012R2.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <shareable/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/CmsrvAPP2.raw'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:d2:40:25'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-02c5daef-662a-85ba-7291-485118badc64</label> <imagelabel>libvirt-02c5daef-662a-85ba-7291-485118badc64</imagelabel> </seclabel> </domain>
The USB tablet could be a culprint, as could the choice of video mode.
I'd suggest that you want to install the QXL video driver, and setup SPICE instead of VNC, along with the SPICE guest agent. This gives a much better performing graphics layer, and better performing mouse. instead of the USB tablet which is known to have high CPU cost.
Regards, Daniel
There is none of enlightenment timer features enabled, I`d suggest to start fixing the issue by adding them in the config. USB tablet is a great problem too for a generated additional workload in idle, though usb3 tablet connection results in much lower cpu consumption than usb2.
The guest XML shown has not got either USB2 or USB3 controllers present, so the tablet will be operating in USB1 mode which is awful for performance Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Results ---------- First I want to show my appreciation to Daniel and Andrey. So thanks... I've implemented Spice, removed the touchpad and implemented enlightenment timer... PCVIRT1 with Windows 8.1 is on 5% host CPU usage... (OK) CmsrvAPP2 with Server 2012 R2 is still on 50% (Bummer...) A new freshly installed Server 2012 R2 with nothing activated or installed on gives 12% (Not completely happy) More tips are welcome.... See traceFlag T8038 section on https://pve.proxmox.com/wiki/Performance_Tweaks I've also noticed it on other sources... On the CmsrvAPP2 the SQL server is a SQL essential, so I have to figure out how to set the traceFlag on a SQL essential... -----Oorspronkelijk bericht----- Van: Daniel P. Berrange [mailto:berrange@redhat.com] Verzonden: vrijdag 13 maart 2015 11:41 Aan: Andrey Korolyov CC: Dominique Ramaekers; libvirt-users@redhat.com Onderwerp: Re: [libvirt-users] Processor usage of qemu process. On Fri, Mar 13, 2015 at 12:58:32PM +0300, Andrey Korolyov wrote:
On Fri, Mar 13, 2015 at 12:35 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Fri, Mar 13, 2015 at 10:32:14AM +0100, Dominique Ramaekers wrote:
Dear Daniel, my XML's:
Note: It seems I was to quick, the Windows 8.1 isn't fixed...
Windows Server 2015 R2
<domain type='kvm' id='146'> <name>CmsrvAPP2</name> <uuid>02c5daef-662a-85ba-7291-485118badc64</uuid> <memory unit='KiB'>3149824</memory> <currentMemory unit='KiB'>3149824</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Westmere</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='rdtscp'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='pcid'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='monitor'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/virtiodrivers.iso'/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/WIN2012R2.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <shareable/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/CmsrvAPP2.raw'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:d2:40:25'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-02c5daef-662a-85ba-7291-485118badc64</label> <imagelabel>libvirt-02c5daef-662a-85ba-7291-485118badc64</imagelabel> </seclabel> </domain>
The USB tablet could be a culprint, as could the choice of video mode.
I'd suggest that you want to install the QXL video driver, and setup SPICE instead of VNC, along with the SPICE guest agent. This gives a much better performing graphics layer, and better performing mouse. instead of the USB tablet which is known to have high CPU cost.
Regards, Daniel
There is none of enlightenment timer features enabled, I`d suggest to start fixing the issue by adding them in the config. USB tablet is a great problem too for a generated additional workload in idle, though usb3 tablet connection results in much lower cpu consumption than usb2.
The guest XML shown has not got either USB2 or USB3 controllers present, so the tablet will be operating in USB1 mode which is awful for performance Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Small update: traceFlag T8038 => no improvement... -----Oorspronkelijk bericht----- Van: Dominique Ramaekers Verzonden: vrijdag 13 maart 2015 16:35 Aan: 'Daniel P. Berrange'; Andrey Korolyov CC: libvirt-users@redhat.com Onderwerp: RE: [libvirt-users] Processor usage of qemu process. Results ---------- First I want to show my appreciation to Daniel and Andrey. So thanks... I've implemented Spice, removed the touchpad and implemented enlightenment timer... PCVIRT1 with Windows 8.1 is on 5% host CPU usage... (OK) CmsrvAPP2 with Server 2012 R2 is still on 50% (Bummer...) A new freshly installed Server 2012 R2 with nothing activated or installed on gives 12% (Not completely happy) More tips are welcome.... See traceFlag T8038 section on https://pve.proxmox.com/wiki/Performance_Tweaks I've also noticed it on other sources... On the CmsrvAPP2 the SQL server is a SQL essential, so I have to figure out how to set the traceFlag on a SQL essential... -----Oorspronkelijk bericht----- Van: Daniel P. Berrange [mailto:berrange@redhat.com] Verzonden: vrijdag 13 maart 2015 11:41 Aan: Andrey Korolyov CC: Dominique Ramaekers; libvirt-users@redhat.com Onderwerp: Re: [libvirt-users] Processor usage of qemu process. On Fri, Mar 13, 2015 at 12:58:32PM +0300, Andrey Korolyov wrote:
On Fri, Mar 13, 2015 at 12:35 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Fri, Mar 13, 2015 at 10:32:14AM +0100, Dominique Ramaekers wrote:
Dear Daniel, my XML's:
Note: It seems I was to quick, the Windows 8.1 isn't fixed...
Windows Server 2015 R2
<domain type='kvm' id='146'> <name>CmsrvAPP2</name> <uuid>02c5daef-662a-85ba-7291-485118badc64</uuid> <memory unit='KiB'>3149824</memory> <currentMemory unit='KiB'>3149824</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Westmere</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='rdtscp'/> <feature policy='require' name='est'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds'/> <feature policy='require' name='smx'/> <feature policy='require' name='ss'/> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ht'/> <feature policy='require' name='dca'/> <feature policy='require' name='pcid'/> <feature policy='require' name='tm'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='pdpe1gb'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> <feature policy='require' name='monitor'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm-spice</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/virtiodrivers.iso'/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/WIN2012R2.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <shareable/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/poolCmsrvVH2/CmsrvAPP2.raw'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <interface type='bridge'> <mac address='52:54:00:d2:40:25'/> <source bridge='br0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='vmvga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='apparmor' relabel='yes'> <label>libvirt-02c5daef-662a-85ba-7291-485118badc64</label> <imagelabel>libvirt-02c5daef-662a-85ba-7291-485118badc64</imagelabel> </seclabel> </domain>
The USB tablet could be a culprint, as could the choice of video mode.
I'd suggest that you want to install the QXL video driver, and setup SPICE instead of VNC, along with the SPICE guest agent. This gives a much better performing graphics layer, and better performing mouse. instead of the USB tablet which is known to have high CPU cost.
Regards, Daniel
There is none of enlightenment timer features enabled, I`d suggest to start fixing the issue by adding them in the config. USB tablet is a great problem too for a generated additional workload in idle, though usb3 tablet connection results in much lower cpu consumption than usb2.
The guest XML shown has not got either USB2 or USB3 controllers present, so the tablet will be operating in USB1 mode which is awful for performance Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

As far as I can understand the mentioned improvement is targeted on a polling mode for a MSSQL, there is no wonder for observing relatively high hypervisor CPU consumption without any sign of same consumption in a guest itself. Certain kinds of applications (PBXes, Chrome/Chromium, seemingly MSSQL) may poll some resource very frequently, causing wakeups in the host for guest process and increasing overall running time of a guest process. I`ve heard of none of the mitigations for this class of workload issues, though you can experiment with guest timer settings if you want to. As we are talking in the libvir-list, it is safe to suggest to use native HyperV host to eliminate this problem completely. :)

Ok, thanks Andrey. I experience a behavior that can be placed in your explanation (dough I certainly not a expert :-) ). If SQL guest has a CPU load of 5%, it takes up 50% on the host. Sometimes (late in the evening), the gest cpu load drops to almoust 0% and the host CPU-load drops to about 10% (same as the freshly installed server). So maybe due to the non-activity of the SQL-clients, the SQL-server goes in a kind of rest-state and stops polling for a while until a client accesses the database again or a maintenance plan is started... I'll settle for now and stop tweaking. Here below, a summary of tips: - Setting video to QXL and the display channel to Spice <video> <model type='qxl' ram='65536' vram='65536' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> - Using HyperV enlightenemt timer <features> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> </hyperv> <features/> <clock ...> <timer name='hypervclock' present='yes'/> </clock> - Delete the tablet entry in the input section Again thanks Daniel and Andrey. -----Oorspronkelijk bericht----- Van: Andrey Korolyov [mailto:andrey@xdel.ru] Verzonden: vrijdag 13 maart 2015 20:16 Aan: Dominique Ramaekers CC: Daniel P. Berrange; libvirt-users@redhat.com Onderwerp: Re: [libvirt-users] Processor usage of qemu process. As far as I can understand the mentioned improvement is targeted on a polling mode for a MSSQL, there is no wonder for observing relatively high hypervisor CPU consumption without any sign of same consumption in a guest itself. Certain kinds of applications (PBXes, Chrome/Chromium, seemingly MSSQL) may poll some resource very frequently, causing wakeups in the host for guest process and increasing overall running time of a guest process. I`ve heard of none of the mitigations for this class of workload issues, though you can experiment with guest timer settings if you want to. As we are talking in the libvir-list, it is safe to suggest to use native HyperV host to eliminate this problem completely. :)
participants (3)
-
Andrey Korolyov
-
Daniel P. Berrange
-
Dominique Ramaekers