Red Hat Bugzilla – Bug 674562
disable vhost-net for rhel5 and older guests
Last modified: 2011-05-19 09:01:28 EDT
before rhel6.0 virtio does not use msix. When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU utilization than userspace virtio which handles networking in the same thread. We'll need to fix this by adding level irq support in kvm irqfd, for now disable vhost-net in these configurations.
Please provide some testing notes on how QE can effectively confirm/verify this fix is in applied correctly. thanks, Martin
run some stress test. when vhost-net is used, you will see a vhost thread doing a lot of work. without, work is done by qemu thread.
so to clarify: try this with rhel6 you will see vhost try with rhel5 you will see no vhost installs to be done with libvirt
# qemu-kvm -drive file='/mnt/linux/RHEL-Server-5.6-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2,aio=native,snapshot=on -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idqJrk0t,mac=9a:0c:2b:2e:ab:13,netdev=idqJrk0t,id=ndev00idqJrk0t,bus=pci.0,addr=0x3 -netdev tap,id=idqJrk0t,vhost=on,ifname='t0-165012-Ywsy',script='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no',vhostforce=off ... qemu: -netdev tap,id=idqJrk0t,vhost=on,ifname=t0-165012-Ywsy,script=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch,downscript=no,vhostforce=off: Invalid parameter 'vhostforce' vhostforce can't be used with '-netdev tap,...,forcevhost=off' ? Currently forcevhost is 'on' by default, that means vhost will be enable for no-msi guest by default, is it expected?
After talked with Jason, I reported another bug, Bug 683295 - qemu-kvm: Invalid parameter 'vhostforce'
Boot up rhel4, rhel5, rhek6 with 'vhost=on', and check if vhost_net works by # perf top -p `pgrep vhost` guest works ----- ----- rhel4 no rhel5 no rhel6 yes qemu-kvm-0.12.1.2-2.150.el6.x86_64 So moving to VERIFIED.
*** Bug 670415 has been marked as a duplicate of this bug. ***
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: older guests (RHEL 5 and older) don't support MSI. Consequence: vhost-net has higher CPU utilization than userspace virtio on guests that don't support MSI. Fix: disable vhost-net for non-MSI guests Consequence: non-MSI guests will use userspace virtio-net and get better performance than vhost-net.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0534.html