Make sure you pin your cpus and possibly set huge pages, also don't use qcow2 use raw with no cache and native thread
On Jan 23, 2017 11:18 AM, "Alex Williamson" <alex.l.william...@gmail.com> wrote: > [re-adding vfio-users] > > On Mon, Jan 23, 2017 at 10:11 AM, <itv...@gmail.com> wrote: > >> QEMU command is : >> >> >> >> #!/bin/bash >> >> >> >> ## PARAMS ############################## >> ############################## >> >> CMD="-name vm2 -enable-kvm" >> >> CMD="$CMD -machine type=pc,accel=kvm,kernel_irqchip=on,mem-merge=off" >> >> >> >> CMD="$CMD -rtc base=localtime,clock=host,driftfix=none" >> >> >> >> CMD="$CMD -drive if=pflash,format=raw,readonly, >> file=/usr/share/ovmf/OVMF_CODE.fd" >> >> CMD="$CMD -drive if=pflash,format=raw,file=/root/vm/vm2.fd" >> >> >> >> ## CPU >> ############################################################ >> +nx >> >> CMD="$CMD -cpu host,kvm=off,hv_time,hv_relaxe >> d,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=Nvidia43FIX -smp cores=6" >> >> >> >> ## MEM ############################## >> ############################## >> >> CMD="$CMD -m $((8*1024))" ## HOST HAS 16GB >> >> >> >> ## PCI-E ############################## >> ############################## >> >> CMD="$CMD -device vfio-pci,host=01:00.0,multifunction=on" >> >> CMD="$CMD -device vfio-pci,host=01:00.1" >> >> >> >> CMD="$CMD -device vfio-pci,host=02:00.0" ## USB 3.0 EATRON >> >> CMD="$CMD -device vfio-pci,host=04:00.0" ## USB 3.0 EATRON >> >> >> >> ## NET ############################## >> ############################## >> >> CMD="$CMD -net nic,model=virtio -net bridge,br=bridge0" >> >> >> >> ## DRIVES ############################## >> ############################## >> >> CMD="$CMD -device virtio-blk-pci,drive=device_blk_one" >> >> CMD="$CMD -drive file=/dev/mapper/debian--vg-wi >> ndows,format=raw,if=none,aio=native,cache.direct=on,cache= >> none,id=device_blk_one" >> >> >> >> ## OTHER ############################## >> ############################## >> >> CMD="$CMD -monitor stdio" >> >> CMD="$CMD -display none" >> >> CMD="$CMD -vga none" >> >> CMD="$CMD -nodefaults -nodefconfig" >> >> >> >> ## STAR OF THE SHOW >> >> qemu-system-x86_64 $CMD >> >> >> > So the good news is you're already leaving 2 cores for the host, the bad > news is that the next level of tuning you need to do is very difficult when > using QEMU directly from the commandline. libvirt makes is so much easier. > > _______________________________________________ > vfio-users mailing list > vfio-users@redhat.com > https://www.redhat.com/mailman/listinfo/vfio-users > >
_______________________________________________ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users