I.3 Multiqueue on IPFE (KVM)

To enable multique on the KVM flavor and glance image for the IPFE instance. Perform the following procedure, this improves the network throughout VM.

Update the flavor and image to enable multiqueue. All guests using that image are created with multiqueue enabled. By default, the combined number of queues for a VM is 1. KVM supports a maximum of 8 queues per VM in its TAP devices.

Note:

The maximum number of queues can be increased in the VM's configuration XML, but it must also be set within the VM during runtime.
  1. Enable Multiqueue on IPFE:
    Increase the number of queues. By default, the combined number of queues for a VM is 1. KVM supports a maximum of 8 queues per VM in its TAP devices.
    The KVM only supports a maximum of eight queues per VM in its TAP devices.

    Note:

    The max can be increased in the VM's configuration XML but must be set to max inside the VM during runtime.
  2. View the list of all the VMs:
    # virsh list --all
  3. Shut down the VM before modifying its XML configuration:
    virsh shutdown <VM Name>
  4. Edit the VM's XML configuration to set the maximum number of combined RX and TX queues:
    # virsh edit <VM Name>
    Example: virsh edit DSRMP
  5. Locate the XML tag for <interface ..> and modify it for each interface.

    Note:

    Follow this process for all the interfaces in the XML.

    The existing interface tag appears as below:
    Interface Tag

  6. Modify the XML and add the following line to the interface.
    <driver name='vhost' queues='6'/>

    Here, 6 represents the number of queues and can be maximum upto 8.

    The updated tag appears as below:
    <interface type='bridge'>
        <mac address='52:54:00:bf:2f:a0'/>
        <source bridge='xsi1'/>
        <model type='virtio'/>
        <driver name='vhost' queues='6'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
  7. After the XML is modified, Perform the following command to start the VM for the changes to take effect:
    virsh start <VM Name>
  8. Log in to the VM using the IP or virsh console and set the number of multiqueues as required for the interfaces.
    # virsh console <VM Name>
  9. Run the following command to make these changes persistent. To change ethx interface, edit /etc/sysconfig/network-scripts/ifcfg-ethx file and edit or append "ethx combined" in this parameter ETHTOOL_OPTS= as shown below.
    ETHTOOL_OPTS="......;--set-channels ethx combined 6"

    Note:

    The value 6 is for number of vcpu in the VM. Modify the value according to your VM.
  10. Set the number of combined queues to 6:
    # ethtool -L eth2 combined 6

    Note:

    Perform this for all the interfaces (xsi1 and xsi2). The number of combined queues can vary from 1 to the value set in the guest XML in Step 5.
  11. To verify, list the current number of combined queues for the interface:
    [root@DSR-Gen10-ol7 administrator]# ethtool -l eth2