Configuring Receive-Side Scaling (RSS) in OpenStack

Getting Started with Napatech Link-Virtualization™ Software

Platform
Napatech SmartNIC
Content Type
Getting Started
Getting Started Guide
Capture Software Version
Link-Virtualization™ Software 4.5

Enabling the multiqueue support allows the guest instances to increase the network throughput.

Before you begin

The OpenStack deployment is complete.

About this task

This describes how to enable RSS (multiqueue receive) in OpenStack.

Procedure

  1. Edit the nova.conf file on the target compute node.
    vim /etc/nova/nova.conf
    Find the [PCI] section. The following shows an example for a VLAN-tunneled network.
    [pci]
    passthrough_whitelist = {"address":"0000:3b:00.4","physical_network":"public"}
    passthrough_whitelist = {"address":"0000:3b:00.5","physical_network":"public"}
    passthrough_whitelist = {"address":"0000:3b:00.6","physical_network":"public"}
    Set the number of queues as follows.
    [pci]
    passthrough_whitelist = {"address":"0000:3b:00.4","physical_network":"public","queues":2}
    passthrough_whitelist = {"address":"0000:3b:00.5","physical_network":"public","queues":2}
    passthrough_whitelist = {"address":"0000:3b:00.6","physical_network":"public","queues":2}
    An example for a VXLAN-tunneled network:
    [pci]
    passthrough_whitelist = {"address":"0000:3b:00.04"}
    passthrough_whitelist = {"address":"0000:3b:00.05"} 
    passthrough_whitelist = {"address":"0000:3b:00.06"}
    Set the number of queues as follows.
    [pci]
    passthrough_whitelist = {"address":"0000:3b:00.04","queues":2}
    passthrough_whitelist = {"address":"0000:3b:00.05","queues":2} 
    passthrough_whitelist = {"address":"0000:3b:00.06","queues":2}
  2. Restart the nova services on the compute node.
    systemctl restart openstack-nova-*
  3. On the controller node, create a VM with the target number of queues.
    openstack flavor create --public <flavor_name> --id auto \
    --ram <RAM_size_in_MB> --disk <disk_size_in_GB> --vcpus <number_of_vCPU>
    For example:
    openstack flavor create --public p1.medium --id auto \
    --ram 4096 --disk 40 --vcpus 4
    Set the number of queues for a port.
    openstack port set --binding-profile queues=<number_of_queues> <port_name>
    For example:
    openstack port set --binding-profile queues=2 port10
    --binding-profile queues=2 instructs the OpenStack scheduler to find a virtual function with the specified number of queues. If a virtual function with the specified number of queues is not found in any passthrough_whitelist, or virtual functions are not available, the VM will not start.
    Note: If the queue parameter is not specified with the port set --binding-profile command, the OpenStack scheduler will take any first available virtual function from passthrough_whitelist regardless of the number of queues defined in the passthrough_whitelist configuration. It is therefore recommended to create a port and a VM with the target number of queues using the queue parameter in the port set --binding-profile command.
    Enable huge pages for the flavor.
    openstack flavor set <flavor_name> --property hw:mem_page_size=large
    For example:
    openstack flavor set p1.medium --property hw:mem_page_size=large
    Virtio packed ring can be used if required. Set virtio packed ring as follows.
    openstack image set fedora --property driver_packed='True'
    After the flavor configuration, a VM instance can be created.
    openstack server create --flavor <flavor_name> \
    --image <image_name> --port <port_name> <vm_name>
    For example:
    openstack server create --flavor m1.medium \
    --image fedora_cloud_qcow --port port10 vm1