You are not logged in.

#1 2016-03-16 10:28:27

blechdose
Member
Registered: 2016-03-16
Posts: 2

[QEMU/KVM] CPU pinning without libvirt

Hi,

I'm using QEMU/KVM to run a virtual machine with Windows 8.1 for gaming (PCI passthrough VGA and PCI soundcard)

I've heard of pinning vCPUs to real CPU cores to improve performance. There are many guides to do this using libvirt but I don't want to use libvirt. How can I use cpu pinning with the qemu-system command?

This is how I start my VM using qemu:

sudo qemu-system-x86_64 \
-serial none \
-parallel none \
-nodefaults \
-nodefconfig \
-enable-kvm \
-name Win8 \
-machine type=pc-q35-2.4 \
-cpu host,kvm=off,check \
-smp sockets=1,cores=3,threads=2 \
-m size=6144 \
-drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
-drive if=pflash,format=raw,file=./OVMF_VARS-pure-efi.fd \
-rtc base=localtime \
-net nic,macaddr=52:54:00:a0:41:92,model=virtio,name=net0 \
-net bridge,name=bridge0,br=br0 \
-drive file=/home/blechdose/KVM-cli/hdd/win8.hdd,if=virtio,boot=on \
-nographic \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
-device vfio-pci,host=04:00.0,bus=root.1,addr=00.2 \
-device vfio-pci,host=04:00.2,bus=root.1,addr=00.3 \
-usb -device usb-host,vendorid=0x413c,productid=0x2010 \
-usb -device usb-host,vendorid=0x1e7d,productid=0x2e22 \
-usb -device usb-host,vendorid=0x08bb,productid=0x2900

Kernel is Linux 4.1.19-1-vfio-lts

Also are there more performance improvements I could use?

Sadly I couldn't find much information on this.

Offline

Board footer

Powered by FluxBB