public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Asdo <asdo@shiftmail.org>
To: "'KVM-ML (kvm@vger.kernel.org)'" <kvm@vger.kernel.org>
Subject: vhost disables kvm acceleration
Date: Thu, 10 Feb 2011 19:49:48 +0100	[thread overview]
Message-ID: <4D54334C.2080208@shiftmail.org> (raw)

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

             reply	other threads:[~2011-02-10 18:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 18:49 Asdo [this message]
2011-02-11 13:56 ` vhost disables kvm acceleration Asdo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D54334C.2080208@shiftmail.org \
    --to=asdo@shiftmail.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox