Poor CPU performance

Hello,

I am using qemu/kvm to run a windows 11 guest on linux host.
My CPU is AMD 9600X.
I tried to tweak CPU pinning (with archlinux guide) with no improvement.
My system feels slow, and I ran a passmark CPU performance test, single threaded I get 2900 with virtualization and 4500 without. I also tested nvme passthrough speed I get 4000 instead of 7000Mbs
When guest is idle, it consumes > 50% CPU on host.

I also tried “feature policy=‘require’ name=‘topoext’” as advised in the wiki for AMD CPU, and this is worse

Here is my current CPU pinning :

  <vcpu placement="static">6</vcpu>
  <iothreads>1</iothreads>
 <cputune>
    <vcpupin vcpu="0" cpuset="3"/>
    <vcpupin vcpu="1" cpuset="9"/>
    <vcpupin vcpu="2" cpuset="4"/>
    <vcpupin vcpu="3" cpuset="10"/>
    <vcpupin vcpu="4" cpuset="5"/>
    <vcpupin vcpu="5" cpuset="11"/>
    <emulatorpin cpuset="0-2,6-8"/>
    <iothreadpin iothread="1" cpuset="0-2,6-8"/>
  </cputune>
 <cpu mode="host-passthrough" check="none" migratable="on">
    <topology sockets="1" dies="1" cores="2" threads="3"/>
  </cpu>
  <clock offset="localtime">
    <timer name="hpet" present="yes"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
1 Like

That seems about in line with my experience in virtualbox. Do you mean when idle, it’s taking 50% of one CPU core?

Did you have the same problem with windows 10?

Yes I had the same issue with W10
When windows is idle, I watch with “top” on host, and it goes between 50 and 100% of one core. When I run a benchmark on windows it uses 600% of my host, which makes sense because I gave it 6 vcpu.