I already had iothread=1.If you meant aio=threads, then yes. You also need iothread=1.
As for cache=none (default), I rely on what the physical disk controller provides. In my analysis, the performance improvement of also enabling various QEMU cache types was negligible. It can also make troubleshooting difficult by shifting the problem around and can cause host memory pressure and undesirable paging IO. Stefan speaks to this in https://bugzilla.kernel.org/show_bug.cgi?id=199727#c12 and https://bugzilla.kernel.org/show_bug.cgi?id=199727#c16.
Are you using any other SCSI Controller types on any other VMs, or are they all VirtIO SCSI single?
It might be helpful to drop the contents of an example VM configuration from its *.conf file @/etc/pve/qemu-server/
.
It might also be informative if you grab one of the pids of an affected kvm process fromtop
, and drop the output ofps aux | grep <pid>
.
All VMs have VirtIO SCSI single.
Here is an example config (the cache=none setting is from today):
Code:
agent: 1
bios: seabios
boot: order=ide0;scsi0;scsi1;scsi2;scsi3;scsi4
cores: 2
cpu: host
machine: q35
memory: 512
meta: creation-qemu=8.1.5,ctime=1711784910
name: srv11v
net0: virtio=00:50:56:91:72:cf,bridge=vmbr2,queues=8
ostype: l26
scsi0: local-zfs:vm-103-disk-0,aio=threads,cache=none,discard=on,iothread=1,size=600M,ssd=1
scsi1: local-zfs:vm-103-disk-1,aio=threads,cache=none,discard=on,iothread=1,size=4G,ssd=1
scsi2: local-zfs:vm-103-disk-2,aio=threads,cache=none,discard=on,iothread=1,size=20G,ssd=1
scsi3: local-zfs:vm-103-disk-3,aio=threads,cache=none,discard=on,iothread=1,size=6G,ssd=1
scsi4: local-zfs:vm-103-disk-4,aio=threads,cache=none,discard=on,iothread=1,size=3500M,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=564de6d5-959c-003e-e7f0-8b46ea663c35
sockets: 1
vmgenid: 91dae9ae-c84c-4c6d-8871-9e9a6af5a748
I checked the PIDs. It was completely mixed, some Linux VMs, some Windows VMs, larger VMs, small VMs.
Here is the cmdline from this VM:
Code:
/usr/bin/kvm -id 103 -name srv11v,debug-threads=on -no-shutdown -chardev socket,id=qmp,path=/var/run/qemu-server/103.qmp,server=on,wait=off -mon chardev=qmp,mode=control -chardev socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5 -mon chardev=qmp-event,mode=control -pidfile /var/run/qemu-server/103.pid -daemonize -smbios type=1,uuid=564de6d5-959c-003e-e7f0-8b46ea663c35 -smp 2,sockets=1,cores=2,maxcpus=2 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg -vnc unix:/var/run/qemu-server/103.vnc,password=on -cpu host,+kvm_pv_eoi,+kvm_pv_unhalt -m 512 -object iothread,id=iothread-virtioscsi0 -object iothread,id=iothread-virtioscsi1 -object iothread,id=iothread-virtioscsi2 -object iothread,id=iothread-virtioscsi3 -object iothread,id=iothread-virtioscsi4 -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg -device vmgenid,guid=91dae9ae-c84c-4c6d-8871-9e9a6af5a748 -device usb-tablet,id=tablet,bus=ehci.0,port=1 -device VGA,id=vga,bus=pcie.0,addr=0x1 -chardev socket,path=/var/run/qemu-server/103.qga,server=on,wait=off,id=qga0 -device virtio-serial,id=qga0,bus=pci.0,addr=0x8 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on -iscsi initiator-name=iqn.1993-08.org.debian:01:297d681f98de -device virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0 -drive file=/dev/zvol/rpool/data/vm-103-disk-0,if=none,id=drive-scsi0,cache=none,aio=threads,discard=on,format=raw,detect-zeroes=unmap -device scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,rotation_rate=1,bootindex=101 -device virtio-scsi-pci,id=virtioscsi1,bus=pci.3,addr=0x2,iothread=iothread-virtioscsi1 -drive file=/dev/zvol/rpool/data/vm-103-disk-1,if=none,id=drive-scsi1,cache=none,aio=threads,discard=on,format=raw,detect-zeroes=unmap -device scsi-hd,bus=virtioscsi1.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,rotation_rate=1,bootindex=102 -device virtio-scsi-pci,id=virtioscsi2,bus=pci.3,addr=0x3,iothread=iothread-virtioscsi2 -drive file=/dev/zvol/rpool/data/vm-103-disk-2,if=none,id=drive-scsi2,cache=none,aio=threads,discard=on,format=raw,detect-zeroes=unmap -device scsi-hd,bus=virtioscsi2.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi2,id=scsi2,rotation_rate=1,bootindex=103 -device virtio-scsi-pci,id=virtioscsi3,bus=pci.3,addr=0x4,iothread=iothread-virtioscsi3 -drive file=/dev/zvol/rpool/data/vm-103-disk-3,if=none,id=drive-scsi3,cache=none,aio=threads,discard=on,format=raw,detect-zeroes=unmap -device scsi-hd,bus=virtioscsi3.0,channel=0,scsi-id=0,lun=3,drive=drive-scsi3,id=scsi3,rotation_rate=1,bootindex=104 -device virtio-scsi-pci,id=virtioscsi4,bus=pci.3,addr=0x5,iothread=iothread-virtioscsi4 -drive file=/dev/zvol/rpool/data/vm-103-disk-4,if=none,id=drive-scsi4,cache=none,aio=threads,discard=on,format=raw,detect-zeroes=unmap -device scsi-hd,bus=virtioscsi4.0,channel=0,scsi-id=0,lun=4,drive=drive-scsi4,id=scsi4,rotation_rate=1,bootindex=105 -netdev type=tap,id=net0,ifname=tap103i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on,queues=8 -device virtio-net-pci,mac=00:50:56:91:72:cf,netdev=net0,bus=pci.0,addr=0x12,id=net0,vectors=18,mq=on,packed=on,rx_queue_size=1024,tx_queue_size=256 -machine type=q35+pve0