[vfio-users] Performance problem with i5 3330

Sinisa Tkalec xslisx at gmail.com
Tue Sep 15 09:37:16 UTC 2015


cpu governor to performance?

isolcpus, nohz_full  kernel boot options?

Maybe your host load is too much....

You might be better off creating 2nd linux vm for that host stuff...


On 09/15/2015 11:26 AM, francesco dicarlo wrote:
> tried right now. same results.
>
> this is the command line generated from virt-manager.
>
> Tried playing directly from vm without streaming but results are the 
> same. Cpus near 90% and low frame rate.
>
>  /usr/bin/qemu-system-x86_64 -name win8.1 -S -machine 
> pc-i440fx-trusty,accel=kvm,usb=off -cpu host -bios /usr/
> share/ovmf/OVMF.fd -m 8192 -realtime mlock=off -smp 
> 3,sockets=1,cores=3,threads=1 -uuid 
> f7060f72-6428-40fe-b19e-6ced0837149e -nographic -no-user-config 
> -nodefaults -chardev 
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/win8.1.monitor,server,nowait 
> -mon chardev=charmonitor,id=monitor,mode=control -rtc 
> base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard 
> -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global 
> PIIX4_PM.disable_s4=1 -boot menu=on,strict=on -device 
> ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 -device 
> ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 
> -device 
> ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 
> -device 
> ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 
> -drive 
> file=/home/repo/vmdisk/win8vmgame.img,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native 
> -device 
> virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 
> -netdev tap,fd=24,id=hostnet0,vhost=on,vhostfd=25 -device 
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:db:d1:3e,bus=pci.0,addr=0x3 
> -chardev pty,id=charserial0 -device 
> isa-serial,chardev=charserial0,id=serial0 -device 
> vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x6 -device 
> vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0x7 -device 
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 -cpu host,kvm=off 
> -vga none -msg timestamp=on
>
> 2015-09-15 11:18 GMT+02:00 Sinisa Tkalec <xslisx at gmail.com 
> <mailto:xslisx at gmail.com>>:
>
>     You wanna set cpu like this:
>
>       <vcpu placement='static'>3</vcpu>
>       <cputune>
>         <vcpupin vcpu='0' cpuset='0'/>
>         <vcpupin vcpu='1' cpuset='1'/>
>         <vcpupin vcpu='2' cpuset='2'/>
>       </cputune>
>       <os>
>
>       <cpu mode='host-passthrough'>
>         <topology sockets='1' cores='3' threads='1'/>
>       </cpu>
>
>
>
>     On 09/15/2015 11:16 AM, francesco dicarlo wrote:
>>     Done with the scan. Nothing found...
>>
>>     Besides running only malwarebytes anti-malware on win vm hogged
>>     guest cpu to 70% and all 3 cores assigned to vm on the host went
>>     at 65%.
>>
>>     Only scanning... For the sake of completeness, I will post my vm xml.
>>
>>
>>     <domain type='kvm' id='12'
>>     xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
>>     <name>win8.1</name>
>>     <uuid>f7060f72-6428-40fe-b19e-6ced0837149e</uuid>
>>     <memory unit='KiB'>8388608</memory>
>>     <currentMemory unit='KiB'>8388608</currentMemory>
>>     <vcpu placement='static' cpuset='0-2'>3</vcpu>
>>     <resource>
>>       <partition>/machine</partition>
>>     </resource>
>>     <os>
>>       <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
>>     <loader>/usr/share/ovmf/OVMF.fd</loader>
>>       <bootmenu enable='yes'/>
>>     </os>
>>     <features>
>>       <acpi/>
>>       <hyperv>
>>         <relaxed state='off'/>
>>         <vapic state='off'/>
>>         <spinlocks state='off'/>
>>       </hyperv>
>>     </features>
>>     <cpu mode='custom' match='exact'>
>>       <model fallback='allow'>SandyBridge</model>
>>       <vendor>Intel</vendor>
>>       <topology sockets='1' cores='3' threads='1'/>
>>       <feature policy='require' name='vme'/>
>>       <feature policy='require' name='dtes64'/>
>>       <feature policy='require' name='vmx'/>
>>       <feature policy='require' name='erms'/>
>>       <feature policy='require' name='xtpr'/>
>>       <feature policy='require' name='smep'/>
>>       <feature policy='require' name='pcid'/>
>>       <feature policy='require' name='est'/>
>>       <feature policy='require' name='monitor'/>
>>       <feature policy='require' name='tm'/>
>>       <feature policy='require' name='acpi'/>
>>       <feature policy='require' name='osxsave'/>
>>       <feature policy='require' name='ht'/>
>>       <feature policy='require' name='pdcm'/>
>>       <feature policy='require' name='fsgsbase'/>
>>       <feature policy='require' name='f16c'/>
>>       <feature policy='require' name='ds’/>
>>     <feature policy='require' name='tm2'/>
>>         <feature policy='require' name='ss'/>
>>         <feature policy='require' name='pbe'/>
>>         <feature policy='require' name='ds_cpl'/>
>>         <feature policy='require' name='rdrand'/>
>>       </cpu>
>>       <clock offset='localtime'>
>>         <timer name='hypervclock' present='no'/>
>>         <timer name='rtc' tickpolicy='catchup'/>
>>         <timer name='pit' tickpolicy='delay'/>
>>         <timer name='hpet' present='no'/>
>>       </clock>
>>     <on_poweroff>destroy</on_poweroff>
>>     <on_reboot>restart</on_reboot>
>>       <on_crash>restart</on_crash>
>>       <pm>
>>         <suspend-to-mem enabled='no'/>
>>         <suspend-to-disk enabled='no'/>
>>       </pm>
>>     <devices>
>>     <emulator>/usr/bin/qemu-system-x86_64</emulator>
>>         <disk type='file' device='disk'>
>>           <driver name='qemu' type='raw' cache='none' io='native'/>
>>           <source file='/home/repo/vmdisk/win8vmgame.img'/>
>>           <backingStore/>
>>           <target dev='vda' bus='virtio'/>
>>           <boot order='1'/>
>>           <alias name='virtio-disk0'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
>>     function='0x0'/>
>>         </disk>
>>         <controller type='usb' index='0' model='ich9-ehci1'>
>>           <alias name='usb0'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
>>     function='0x7'/>
>>         </controller>
>>         <controller type='usb' index='0' model='ich9-uhci1'>
>>           <alias name='usb0'/>
>>           <master startport='0'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
>>     function='0x0' multifunction='on'/>
>>         </controller>
>>         <controller type='usb' index='0' model='ich9-uhci2'>
>>           <alias name='usb0'/>
>>           <master startport='2'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
>>     function='0x1'/>
>>         </controller>
>>     <controller type='usb' index='0' model='ich9-uhci3'>
>>           <alias name='usb0'/>
>>           <master startport='4'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
>>     function='0x2'/>
>>         </controller>
>>         <controller type='pci' index='0' model='pci-root'>
>>           <alias name='pci.0'/>
>>         </controller>
>>         <controller type='ide' index='0'>
>>           <alias name='ide0'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
>>     function='0x1'/>
>>         </controller>
>>         <interface type='bridge'>
>>           <mac address='52:54:00:db:d1:3e'/>
>>           <source bridge='br0'/>
>>           <target dev='vnet0'/>
>>           <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/5'/>
>>           <target port='0'/>
>>           <alias name='serial0'/>
>>         </serial>
>>     <console type='pty' tty='/dev/pts/5'>
>>           <source path='/dev/pts/5'/>
>>           <target type='serial' port='0'/>
>>           <alias name='serial0'/>
>>         </console>
>>         <hostdev mode='subsystem' type='pci' managed='yes'>
>>           <driver name='vfio'/>
>>           <source>
>>             <address domain='0x0000' bus='0x01' slot='0x00'
>>     function='0x0'/>
>>           </source>
>>           <alias name='hostdev0'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
>>     function='0x0'/>
>>         </hostdev>
>>         <hostdev mode='subsystem' type='pci' managed='yes'>
>>           <driver name='vfio'/>
>>           <source>
>>             <address domain='0x0000' bus='0x01' slot='0x00'
>>     function='0x1'/>
>>           </source>
>>           <alias name='hostdev1'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
>>     function='0x0'/>
>>         </hostdev>
>>         <memballoon model='virtio'>
>>           <alias name='balloon0'/>
>>           <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
>>     function='0x0'/>
>>         </memballoon>
>>       </devices>
>>       <qemu:commandline>
>>         <qemu:arg value='-cpu'/>
>>         <qemu:arg value='host,kvm=off'/>
>>         <qemu:arg value='-vga'/>
>>         <qemu:arg value='none'/>
>>       </qemu:commandline>
>>     </domain>
>>
>>     2015-09-15 11:04 GMT+02:00 francesco dicarlo
>>     <evilsephiroth at gmail.com <mailto:evilsephiroth at gmail.com>>:
>>
>>         hmm a pretty new installation with only installed nvidia
>>         drivers and steam ? it's an image from a reliable source.
>>         just checking with malwarebytes tool.
>>
>>         I inspected the task manager but nothing came up
>>
>>         2015-09-15 10:58 GMT+02:00 BugMaze <bugmaze at networkbreak.net
>>         <mailto:bugmaze at networkbreak.net>>:
>>
>>             Then check your Windows for malware. Most of them are
>>             bitcoin mining proccess that hog the CPU in the background.
>>
>>>>
>>             ----‏ francesco dicarlo كتب ----
>>
>>             60 degree under gaming. pretty normal for that shitty
>>             intel cooler... I use sensors from ubuntu repository.
>>
>>
>>
>>             2015-09-15 10:45 GMT+02:00 BugMaze
>>             <bugmaze at networkbreak.net <mailto:bugmaze at networkbreak.net>>:
>>
>>                 Just a wild guess: Maybe your CPU is throttling, do
>>                 you monitor your CPU's temps?  I used to have a
>>                 similar experience to yours, reseating the cooler
>>                 with new thermal compound was the magic solution.
>>
>>>>
>>                 ----‏ francesco dicarlo كتب ----
>>
>>
>>                 Hi to all, this is my current hardware:
>>
>>                 Cpu: I5 3330
>>                 Ram: 12GB DDR3
>>                 HD: 3 x 4TB(NAS) + 1x120GB (Ubuntu 14.04)
>>                 GPU:Nvidia gtx 970 directCu mini
>>                 DVB-S :Dvb-Sky S952 pci express
>>
>>                 I'm currently using my host for these operations:
>>                 -Rtorrent + filebot + irssi + Rutorrent
>>                 - Kodi 14 Client
>>                 - Vdr Server
>>                 - Mysql server for Kodi central repository
>>                 - NFS server for exposing my nas drives
>>                 - Some cron jobs to update kodi repository
>>
>>                 Usually, cpu usage stays 10 - 15% also with kodi
>>                 reproducing media with ram almost free (890MB on 12GB)
>>
>>                 I've got a windows 8.1 OVMF virtual machine. No
>>                 problem with 970 passthrough.
>>                 Removed hyperV enlightenments,kvm=off with latest
>>                 nvidia drivers.
>>
>>                 Assigned 3vcpus pinning 0-2 with virt-manager ui.
>>                 Assigned a raw image of 100GB for testing. Virtio for
>>                 disk and network.
>>                 There's a bridge br0 on the host machine to provide
>>                 connectivity.
>>                 Using huge pages also.
>>                 Latest ovmf from git.
>>
>>                 I use it as a steam streaming server by using only
>>                 wired ethernet gigabit.
>>
>>                 My problem is only performance.
>>
>>                 When I fire up a game,qemu process use 90% of 3 cpus
>>                 and I have framerate by 15 20 fps while gaming on
>>                 bare metal goes always at 60fps. Tried with various
>>                 games(Borderlands,KOF 13, Child of Light). Client is
>>                 at 90% cpu.
>>
>>                 I used in the past proxmox for my kvm needs with a i5
>>                 3470 and performance was much more(60 fps) that with
>>                 kvm-qemu on my current distro.
>>                 I can't think that there's so much difference between
>>                 i5 3330 and i5 3470.
>>
>>                 Is there something I'm missing? I'm willing to post
>>                 configuration or any other file that you need to do
>>                 an analysis.
>>
>>                 The last thing that I'm going to do is to use a empty
>>                 installation of Ubuntu with nothing installed aside
>>                 kvm packages to see performance...
>>
>>
>>
>>
>>
>>
>>     _______________________________________________
>>     vfio-users mailing list
>>     vfio-users at redhat.com  <mailto:vfio-users at redhat.com>
>>     https://www.redhat.com/mailman/listinfo/vfio-users
>
>
>     _______________________________________________
>     vfio-users mailing list
>     vfio-users at redhat.com <mailto:vfio-users at redhat.com>
>     https://www.redhat.com/mailman/listinfo/vfio-users
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20150915/3cb0221e/attachment.htm>


More information about the vfio-users mailing list