Stutter on Windows when soft load on host


segator

Recommended Posts

lot of sututtering when exist soft load on host, I tried change vcore threads priority to -20/-10,pinning, no pinning.. the only think works is cpu isolation but its not cool as when i'm shutting down the VM i want this cores availables for other applications(like ffmpeg video encoding on the night) 

 

i'm trying to play with chrt to change the scheduler priority without sucess

root@Tower:~# pidof qemu-system-x86_64
15635
root@Tower:~# chrt -f -p 1 15635
chrt: failed to set pid 15635's policy: Operation not permitted

any idea, suggestion?

 

ryzen 3900x

MSI tomahawk x570 wifi

64gb ram ddr4 3200 cl16

 

I readed a lot and played diferent things and unraid versions and always the same :(

currently running 6.9.0 beta29 with cpu pinning

passing thourgh onboard audio device, usb controller and a nvidia RTX 2070

 

qemu command

LC_ALL=C \
PATH=/bin:/sbin:/usr/bin:/usr/sbin \
HOME=/var/lib/libvirt/qemu/domain-1-IsaacGaming \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-1-IsaacGaming/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-1-IsaacGaming/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-1-IsaacGaming/.config \
QEMU_AUDIO_DRV=none \
/usr/local/sbin/qemu \
-name guest=IsaacGaming,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-IsaacGaming/master-key.aes \
-blockdev '{"driver":"file","filename":"/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/etc/libvirt/qemu/nvram/9239375a-31b7-de02-9205-3209712e6715_VARS-pure-efi.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-i440fx-5.1,accel=kvm,usb=off,vmport=off,dump-guest-core=off,mem-merge=off,kernel_irqchip=on,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-cpu host,migratable=on,hypervisor=on,topoext=on,svm=on,invtsc=on,kvmclock=off,hv-time,hv-relaxed,hv-vapic,hv-spinlocks=0x1fff,hv-vpindex,hv-vendor-id=1234567890ab,hv-frequencies,kvm=off,host-cache-info=on,l3-cache=off \
-m 16384 \
-overcommit mem-lock=off \
-smp 1,maxcpus=16,sockets=1,dies=1,cores=8,threads=2 \
-object iothread,id=iothread1 \
-object iothread,id=iothread2 \
-uuid ed8709ad-6ea8-ca1c-a980-2cf05d72f688 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=30,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-boot strict=on \
-device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x4 \
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.0,addr=0x5 \
-device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.0,addr=0x8 \
-device pci-bridge,chassis_nr=4,id=pci.4,bus=pci.0,addr=0x9 \
-device pci-bridge,chassis_nr=5,id=pci.5,bus=pci.0,addr=0xa \
-device pci-bridge,chassis_nr=6,id=pci.6,bus=pci.0,addr=0xb \
-device pci-bridge,chassis_nr=7,id=pci.7,bus=pci.0,addr=0xc \
-device pci-bridge,chassis_nr=8,id=pci.8,bus=pci.0,addr=0xd \
-device pci-bridge,chassis_nr=9,id=pci.9,bus=pci.0,addr=0xe \
-device pci-bridge,chassis_nr=10,id=pci.10,bus=pci.0,addr=0xf \
-device pci-bridge,chassis_nr=11,id=pci.11,bus=pci.0,addr=0x10 \
-device pci-bridge,chassis_nr=12,id=pci.12,bus=pci.0,addr=0x11 \
-device pci-bridge,chassis_nr=13,id=pci.13,bus=pci.0,addr=0x12 \
-device pci-bridge,chassis_nr=14,id=pci.14,bus=pci.0,addr=0x13 \
-device pci-bridge,chassis_nr=15,id=pci.15,bus=pci.0,addr=0x14 \
-device pci-bridge,chassis_nr=16,id=pci.16,bus=pci.0,addr=0x15 \
-device pci-bridge,chassis_nr=17,id=pci.17,bus=pci.0,addr=0x16 \
-device pci-bridge,chassis_nr=18,id=pci.18,bus=pci.0,addr=0x17 \
-device pci-bridge,chassis_nr=19,id=pci.19,bus=pci.0,addr=0x18 \
-device pci-bridge,chassis_nr=20,id=pci.20,bus=pci.0,addr=0x19 \
-device pci-bridge,chassis_nr=21,id=pci.21,bus=pci.0,addr=0x1a \
-device pci-bridge,chassis_nr=22,id=pci.22,bus=pci.0,addr=0x1b \
-device pci-bridge,chassis_nr=23,id=pci.23,bus=pci.0,addr=0x1c \
-device pci-bridge,chassis_nr=24,id=pci.24,bus=pci.0,addr=0x1d \
-device pci-bridge,chassis_nr=25,id=pci.25,bus=pci.0,addr=0x1e \
-device pci-bridge,chassis_nr=26,id=pci.26,bus=pci.0,addr=0x1f \
-device pci-bridge,chassis_nr=27,id=pci.27,bus=pci.1,addr=0x2 \
-device pci-bridge,chassis_nr=28,id=pci.28,bus=pci.1,addr=0x3 \
-device pci-bridge,chassis_nr=29,id=pci.29,bus=pci.1,addr=0x4 \
-device pci-bridge,chassis_nr=30,id=pci.30,bus=pci.1,addr=0x5 \
-device pci-bridge,chassis_nr=31,id=pci.31,bus=pci.1,addr=0x6 \
-device pci-bridge,chassis_nr=32,id=pci.32,bus=pci.1,addr=0x7 \
-device pci-bridge,chassis_nr=33,id=pci.33,bus=pci.1,addr=0x8 \
-device pci-bridge,chassis_nr=34,id=pci.34,bus=pci.1,addr=0x9 \
-device pci-bridge,chassis_nr=35,id=pci.35,bus=pci.1,addr=0xa \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.0,addr=0x7 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 \
-netdev tap,fd=32,id=hostnet0 \
-device virtio-net,netdev=hostnet0,id=net0,mac=52:54:00:e4:b2:06,bus=pci.1,addr=0x15 \
-netdev tap,fd=33,id=hostnet1 \
-device virtio-net,netdev=hostnet1,id=net1,mac=52:54:00:d0:c9:ca,bus=pci.1,addr=0x14 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=34,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-device 'vfio-pci,host=0000:2d:00.0,id=hostdev0,bus=pci.0,multifunction=on,addr=0x6,romfile=/mnt/user/appdata/TU106 kvm.rom' \
-device vfio-pci,host=0000:2d:00.1,id=hostdev1,bus=pci.0,addr=0x6.0x1 \
-device vfio-pci,host=0000:2d:00.2,id=hostdev2,bus=pci.0,addr=0x6.0x2 \
-device vfio-pci,host=0000:2d:00.3,id=hostdev3,bus=pci.0,addr=0x6.0x3 \
-device vfio-pci,host=0000:01:00.0,id=hostdev4,bootindex=2,bus=pci.2,addr=0x1 \
-device vfio-pci,host=0000:23:00.0,id=hostdev5,bootindex=1,bus=pci.35,addr=0x1 \
-device vfio-pci,host=0000:2f:00.3,id=hostdev6,bus=pci.1,multifunction=on,addr=0x10 \
-device vfio-pci,host=0000:2f:00.4,id=hostdev7,bus=pci.1,addr=0x10.0x1 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

 

 

 

 

Edited by segator
Link to comment

I partially fixed it  adding this on the virsh file <vcpusched vcpus='0-11' scheduler='fifo' priority='99'/>

now i can run high load on host that the VM is not affected 200 points drop on cinebench r20 in VM when running full cpu stress test on host :D

 

but now i notice I have the sttuters only when high network usage, if for example I run iperf3 between host and guest I got 1.27gbps when I should got 10gbps and the VM is completely unusable meanwhile the test is running :(

 

I tried to isolate the networks, first one for internet conneciton and second one for guest-host only network(NFS, smb.. )

Any idea how to fix the stutters?

    <interface type='bridge'>
      <mac address='52:54:00:e4:b2:06'/>
      <source bridge='br0'/>
      <model type='virtio-net'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x15' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='52:54:00:d0:c9:ca'/>
      <source bridge='virbr0'/>
      <model type='virtio-net'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x14' function='0x0'/>
    </interface>

 

 

Link to comment
  • 2 weeks later...
On 10/2/2020 at 8:00 PM, segator said:

but now i notice I have the sttuters only when high network usage, if for example I run iperf3 between host and guest I got 1.27gbps when I should got 10gbps and the VM is completely unusable meanwhile the test is running :(

 

 

 

 

I have this exact same issue, any luck with fixing this?

Edited by jongyrocka
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.