• qemu slow start in comparison with Debian


    Hi there!

    I’m playing currently with QEMU KVM VGA passthrough with OVMF.
    I really enjoy Antergos stable Gnome experience, but one fact that annoying me and stopping me use Antergos as my default desktop OS on my PC(on laptop I use it because I don’t need QEMU here) is that QEMU virtual machine start is slow in comparison with Debian systems.
    I made some testing and it looks like time taken to show windows desktop on Antergos takes twice as much as on Debian.
    On Debian it is around 20 seconds when on Antergos it is about 40

    the main difference I’ve noticed it time to show OVMF logo during boot
    in Antergos it takes 2 much time
    when on Debian/Ubuntu it is displayed almost immediately

    In qemu irc channel someone advised me to try to compile qemu from sources and try compiled version.
    But results stays the same

    I’m using the following command to run VM

    x86_64-softmmu/qemu-system-x86_64 -monitor stdio \
    	-serial none \
    	-parallel none \
    	-nodefaults \
    	-nodefconfig \
    	-no-user-config \
    	-enable-kvm \
    	-name "Windows 10" \
            -M q35 \
    	-cpu host,kvm=off,hv_vapic,hv_time,hv_relaxed,hv_spinlocks=0x1fff,hv_vendor_id=sugoidesu \
    	-smp sockets=1,cores=4,threads=2 \
    	-m 8192 \
    	-mem-prealloc \
            -usb \
            -device usb-ehci,id=ehci \
            -device usb-host,bus=ehci.0,hostbus=1,hostaddr=3 \
    	-machine pc,accel=kvm,kernel_irqchip=on,mem-merge=off \
     	-drive if=pflash,format=raw,file=./windows10.bios,readonly \
            -drive if=pflash,format=raw,file=./windows10_vars.fd \
    	-rtc base=localtime,clock=host,driftfix=none \
    	-boot order=c \
            -net nic,vlan=0 \
            -net user,vlan=0 \
    	-drive if=virtio,file=/dev/vms/windows10,format=raw,cache=none \
    	-drive if=virtio,file=/mnt/DATA2/KVM/windows10-data.qcow2,format=qcow2 \
    	-nographic \
    	-device vfio-pci,host=01:00.0,multifunction=on \
    	-device vfio-pci,host=01:00.1 \
            -usbdevice host:1532:0202 \
            -usbdevice host:09da:5dd6
    
  • Guys from #qemu IRC channels recommended trying to run qemu with different kernels.
    And here we go. LTS kernel 4.9 starts qemu vm faster that current 4.12 kernel.
    So the issue seems related to linux kernels. So, for now, I’ll stick with LTS kernel.

    But what has been changed that has such dramatic (doubled performance in starting VM) ?
    I think this thread should be addressed to kernels section.

debian4 comparison1 slow15 qemu4 Posts 2Views 71
Log in to reply