You’ve got a 6700k, that means you have 8 threads, 4 cores. You should be doing the following:
<cputune>
<vcpupin vcpu="0" cpuset="0"/>
<vcpupin vcpu="1" cpuset="1"/>
<vcpupin vcpu="2" cpuset="2"/>
<vcpupin vcpu="3" cpuset="3"/>
<vcpupin vcpu="4" cpuset="4"/>
<vcpupin vcpu="5" cpuset="5"/>
<emulatorpin cpuset="6,7"/>
<iothreadpin iothread="1" cpuset="6,7"/>
What this does is match the cores and threads on the physical machine to what the VM will expect. The way you’ve got it, it does something like this:
VM PHYSICAL
C1T1 -> C1T2
C1T2 -> C2T1
C2T1 -> C2T2
C2T2 -> C3T1
I’m not sure if KVM and the VM are smart enough to tell the difference, but on my system, it made a significant difference.
If you don’t want the VM to share core 0, try this:
<cputune>
<vcpupin vcpu="0" cpuset="2"/>
<vcpupin vcpu="1" cpuset="3"/>
<vcpupin vcpu="2" cpuset="4"/>
<vcpupin vcpu="3" cpuset="5"/>
<vcpupin vcpu="4" cpuset="6"/>
<vcpupin vcpu="5" cpuset="7"/>
<emulatorpin cpuset="0,1"/>
<iothreadpin iothread="1" cpuset="0,1"/>
Ideally, you want to leave one core for Linux, but that doesn’t seem to be what you’re going for.
Very much so. You should use a direct partition or XFS/EXT4 backed storage, unless you have a large array, on ZFS.
As far as the lockups go, try this, right after <vmport state='off'/>
:
<ioapic driver='kvm'/>
I have a ton of little tweaks to the hyperv section, feel free to pick and choose:
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
<spinlocks state='on' retries='8191'/>
<vpindex state='on'/>
<runtime state='on'/>
<synic state='on'/>
<stimer state='on'/>
<reset state='on'/>
<vendor_id state='on' value='1234567890ab'/>
<frequencies state='on'/>
<tlbflush state='on'/>
</hyperv>
None of this will make a lick of difference without hugepages though.
EDIT:
<video>
<model type="virtio" heads="1" primary="yes">
<acceleration accel3d="yes"/>
</model>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
</video>
This is likely your problem. You’re trying to use virtio video. It’s far from stable, and you should really disable this and fallback to QXL.