I’m running Proxmox as VE. I run few VM’s, Ubuntu VM for work, Ubuntu headless VM for docker containers and Windows VM for gaming.
Recently I tried to use my Focusrite on my Windows VM and started experiencing sound pops and weird audio latency issues and all right audio cut offs.
I got whole USB controller passthrough to the VM. In the mean time I saw that doing “normal” stuff on Ubuntu VM greatly affected the Windows VM when gaming. Trying to solve all of this in got my self into CPU pinning.
Pinning 6 threads on my CPU to Windows VM, I noticed that when playing Battlefield 4 in my case, the VM CPU usage is over 80% almost all of the time when gaming, and the GPU usage rarely goes over 75%. And there are also FPS drops when there is alot of stuff going in the game.
My question is am I pushing the CPU to its max on single threaded?
But this kinda didn’t made sense because if I give 2 more threads to the VM,
GPU usage goes to 100% and CPU usage drops to 50-60%.
I guess ill need some guidance, to optimize my setup.
Thanks!
Hardware Specs:
CPU: Ryzen 5 3600
MB: Asus Rog Strix X570-F
RAM: 2 x 32gb @ 3200Mhz Kingston Renegade
GPU0: AMD Rx 580 4GB Gigabyte
GPU1: AMD ATI Radeon HD 3650 (its really old I know, but its still works )
SSDs: Samsung 860 evo (Proxmox installed here), 2 x Intel D3-S4510 960gb(for VMs)
HDDs: 4 x 3TB in ZFS (don’t know the models)
Qemu has a bug which only affects some systems. Hdd I/O while a virtual SCSI controller is active can stall the qemu process and greatly affect the latency and performance. Even if it’s not an intense workload and even if it is unrelated to the storage of your VMs or happening only on the host (migrating or backing up VMs). Simply set the two advanced storage option on every VM hdd to threaded and thread i/o (I have to look up the correct description) fixed it for me. If you already use virtual SCSI, the guest should be unaffected. Please be carefull if you used other option with your guest (emulated SATA / IDE for example) and change the virtual controller.
Getting inspired by your comment I moved the Windows VM to my NVME drive, same settings, and got quite an improvement. Next ill try to get Windows VM on whole drive passthough.
Moving the disk on Fast NVME or setting VirtIO SCSI Single / iothread=1 / aio=threads for my Windows VM greatly improve performance and fps drops, and CPU and GPU usage.