public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* vhost disables kvm acceleration
@ 2011-02-10 18:49 Asdo
  2011-02-11 13:56 ` Asdo
  0 siblings, 1 reply; 2+ messages in thread
From: Asdo @ 2011-02-10 18:49 UTC (permalink / raw)
  To: 'KVM-ML (kvm@vger.kernel.org)'

Hello
I have set up a server with kernel 2.6.37, qemu-kvm-0.13.0 compiled from
source, and libvirt 0.8.3 patched so to enable use of netdev (and hence
vhost).

When I modprobe vhost_net and restart a VM having virtio networking, the
VM crawls at 1/100th of its normal speed.
It seems to me it's about the speed of emulation without kvm
acceleration (I tried that).
If I stop the machine, remove vhost_net module, and restart the VM, it
is normal speed again.

These are the invocations by libvirt:
(note that libvirt autodetects presence of vhost and uses it, the config
of the VM hasn't changed ; also note that they both specify -enable-kvm ...)

without vhost_net module (=fast)

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
QEMU_AUDIO_DRV=none /usr/local/kvm/bin/qemu-system-x86_64 -S -M pc-0.13
-enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -name
uarray_server -uuid 7db77cca-addd-4cf4-f7cd-5399d217543e -nodefconfig
-nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/uarray_server.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive
file=/virtualmachines/myserver.raw,if=none,id=drive-virtio-disk0,boot=on,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
-netdev tap,fd=54,id=hostnet0 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:69:94:91:65,bus=pci.0,addr=0x3
-usb -vnc 127.0.0.1:3 -vga cirrus -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5


with vhost_net module (=slow)

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
QEMU_AUDIO_DRV=none /usr/local/kvm/bin/qemu-system-x86_64 -S -M pc-0.13
-enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -name
uarray_server -uuid 7db77cca-addd-4cf4-f7cd-5399d217543e -nodefconfig
-nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/uarray_server.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive
file=/virtualmachines/myserver.raw,if=none,id=drive-virtio-disk0,boot=on,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
-netdev tap,fd=52,id=hostnet0,vhost=on,vhostfd=54 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:69:94:91:65,bus=pci.0,addr=0x3
-usb -vnc 127.0.0.1:3 -vga cirrus -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5


What's the problem?

Thank you

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-11 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10 18:49 vhost disables kvm acceleration Asdo
2011-02-11 13:56 ` Asdo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox