Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1066209

Summary: Libvirt should calculate and pass vectors parameter to qemu command line for multiqueue virtio device
Product: Red Hat Enterprise Linux 7 Reporter: jason wang <jasowang>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, bili, chhu, dyuan, honzhang, juzhang, lcui, mprivozn, mzhan, narendra_k, zhwang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.1-24.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1071888 (view as bug list) Environment:
Last Closed: 2014-06-13 09:19:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071888    

Description jason wang 2014-02-18 03:09:06 UTC
Description of problem:

Libvirt should calculate the number of msix vectors and pass it to qemu command line for multiqueue virtio-net (maybe scsi). Otherwise the all virtqueue will share a single vector which will damage the performance.

Upstream commit:

commit 4f588a1b465e2b32c78429e8d2f2c010eb11da19
Author:     Michal Privoznik <mprivozn>
AuthorDate: Fri Aug 23 09:48:24 2013 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Thu Jan 9 15:23:57 2014 +0100

    qemuBuildNicDevStr: Set vectors= on Multiqueue
    
    Yet another advice appeared on the Multiqueue wiki page:
    
    http://www.linux-kvm.org/page/Multiqueue#Enable_MQ_feature
    
    We should add vectors=N onto the qemu command line, where
    N = 2 * (number of queues) + 1.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Michal Privoznik 2014-02-18 11:00:53 UTC
Moving to POST:

http://post-office.corp.redhat.com/archives/rhvirt-patches/2014-February/msg00467.html

Moreover, I've build a scratch build to test:

https://brewweb.devel.redhat.com/taskinfo?taskID=7073866

Comment 3 hyao@redhat.com 2014-02-20 07:54:12 UTC
Reproduced the bug with 
#rpm -qa libvirt
libvirt-1.1.1-23.el7.x86_64
1. Add the following config in domain xml. 
<interface type='network'>
      <mac address='52:54:00:92:d5:ba'/>
      <source network='default'/>
      <target dev='vnet2'/>
      <model type='virtio'/>
      <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </interface>
2.Start the guest and check the qemu command, vectors=2N+1 is not added. 
#ps aux | grep qemu | grep virtio-net



Test the bug with scratch build: 
#rpm -qa libvirt
libvirt-1.1.1-23.el7multiqueue.x86_64

1. Add the following config in domain xml. 
<interface type='network'>
      <mac address='52:54:00:92:d5:ba'/>
      <source network='default'/>
      <target dev='vnet2'/>
      <model type='virtio'/>
      <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </interface>
2.Start the guest and check the qemu command, vectors=2N+1 is added. 
#ps aux | grep qemu | grep virtio-net
...-device virtio-net-pci,tx=bh,ioeventfd=on,event_idx=off,mq=on,vectors=11,netdev=hostnet1,id=net1,mac=52:54:00:92:d5:ba,bus=pci.0,addr=0x6 ...

Comment 5 EricLee 2014-02-26 08:34:26 UTC
Verified pass on libvirt-1.1.1-24.el7, steps as comment #3.

Comment 6 Ludek Smid 2014-06-13 09:19:11 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.