Windows 11 VM goes to 100% CPU after some time

bellocarico

Member
Sep 17, 2022
43
2
8
As I read on this forum there are other people that have CPU usage issue on Windows11 VM.
I have read everything I found and tried the proposed resolution but I couldn't fix the issue.
My tinkering with the configuration spanned between cpu type, numa 0/1, windows 11/10 VM type, etc.
There is a video card pass-through configuration on this VM apart from that it's pretty standard.

Code:
agent: 1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
balloon: 0
bios: ovmf
boot: order=virtio0;ide2;net0
cores: 8
cpu: host,hidden=1
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:05:00.0,pcie=1
hostpci1: 0000:05:00.1,pcie=1
ide2: local:iso/Win11_EnglishInternational_x64v1.iso,media=cdrom,size=5436638K
machine: pc-q35-6.2
memory: 16384
meta: creation-qemu=6.2.0,ctime=1663451702
name: windows-vm
net0: virtio=22:62:61:86:33:AD,bridge=vmbr0
numa: 1
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=0981430a-4732-4aa6-a8ee-9075c9f5531d
sockets: 2
startup: order=3,up=10
tablet: 0
tpmstate0: local-lvm:vm-100-disk-1,size=4M,version=v2.0
vga: memory=128
virtio0: local-lvm:vm-100-disk-2,size=150G
vmgenid: 51595467-d33b-46bd-8df0-4d5675962443

Any help in how to troubleshoot this?

As a secondary question I find the VM very slow despite the 16CPU and 16GB of ram assigned. e.g. opening handbrake on my old win10/esx setup took say 3 seconds, here win11/Proxmox takes easily 10 sec.
 
Last edited:
Config looks fine, but not sure if your custom args "-cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'" could slowdown something.
Did you run some CPU/RAM/disk benchmarks? Not that a slow storage (then there should be a high IO delay in PVE node summary) or something similar is slowing everything down.
 
Thanks for the quick answer.

What would you suggest I use as a custom args?
Also any benchmark software to report on CPU/RAM/Disk you would suggest?
 
Ok for the sake of the title I have made some progressions removing the Pass-through PCIe device and re-adding them as follow:

1664456715229.png
I'm not sure the removing/adding is needed but any ways just to share my experience.

I've also had to edit the vm conf file manually removed the extra parameters of the VM (Iguess they were automatically added by the Windows11 guest profile) and left only "host" so:

Code:
root@black:~ # cat /etc/pve/nodes/black/qemu-server/100.conf
agent: 1
args: -cpu 'host'
balloon: 0
bios: ovmf
boot: order=virtio0;ide2;net0
cores: 8
cpu: host,hidden=1
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:05:00.0,pcie=1
hostpci1: 0000:05:00.1,pcie=1
ide2: local:iso/Win11_EnglishInternational_x64v1.iso,media=cdrom,size=5436638K
machine: pc-q35-6.2
memory: 16384
meta: creation-qemu=6.2.0,ctime=1663451702
name: windows-vm
net0: virtio=22:62:61:86:33:AD,bridge=vmbr0
numa: 1
ostype: win11
scsihw: virtio-scsi-pci
smbios1: uuid=0981430a-4732-4aa6-a8ee-9075c9f5531d
sockets: 2
startup: order=3,up=10
tablet: 0
tpmstate0: local-lvm:vm-100-disk-1,size=4M,version=v2.0
vga: virtio,memory=128
virtio0: local-lvm:vm-100-disk-2,cache=writeback,size=150G
vmgenid: 51595467-d33b-46bd-8df0-4d5675962443

It's now 5 hours and the CPU is now operating within limits.
From where I am there's one additional thing I have spotted that still puzzles me:

Task Manager reports a very low CPU usage (3-5% when idle):
1664457164438.png

Where ProxMox tells me I'm on a 15% range:
1664457251901.png

I understand there's an overhead in virtualisation but I think this difference is too big and any ways you would expect the overhead to be noticeable in percentage e.g. 3% of the VM workload.
So... what am I missing here?

Thanks
 
If you want to see the real CPU and RAM usage of that VM I would suggest having a look at the KVM process running that VM in top (or even better htop, but that package needs to be installed first).
 
htop after applying the "-id 100" filter, says:

1664458691476.png

Why is kvm using so much CPU where the VM itself is totally idle?
 
Hum ok but I don't think that's the issue here, see this second VM of mine this time running Linux (Centos 7)

1664459988426.png

Everything suggests an issue with the Windows VM I'm running and perhaps its KVM configuration.
 
OK I progressed on this although I now have a new issue.

TL;DR The issue is the video card pass-through

Removing the PCI device (adn rebooting to make it effective) reduces the CPU usage to 2-3%. Perfect,

Now... I actually need the Video card pass-through so this is either a bug from Proxmox or a mis-configuration from myself. I'll keep digging.
 
I have been progressing on this topic. Certainly changed more than this but what I remember it was: added iommu=pt to grub and set the pass-through video card as primary GPU.
Now the VM's cpu usage is at 3% as expected!
1664478230159.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!