Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring Network QoS Parameters

Overview

You can use the OpenStack Nova command-line interface (CLI) to specify a quality of service (QoS) setting for a virtual machine’s network interface, by setting the quota of a Nova flavor. Any virtual machine created with that Nova flavor will inherit all of the specified QoS settings. Additionally, if the virtual machine that was created with the QoS settings has multiple interfaces in different virtual networks, the same QoS settings will be applied to all of the network interfaces associated with the virtual machine. The QoS settings can be specified in unidirectional or bidirectional mode.

The quota driver in Neutron converts QoS parameters into libvirt network settings of the virtual machine.

The QoS parameters available in the quota driver only cover rate limiting the network interface. There are no specifications available for policy-based QoS at this time.

QoS Configuration Examples

Although the QoS setting can be specified in quota by using either Horizon or CLI, quota creation using CLI is more robust and stable, therefore, creating by CLI is the recommended method.

Example

CLI for Nova flavor has the following format:

where:

<flavor_name> is the name of an existing Nova flavor.

vif_<direction>_<param_name> is the inbound or outbound QoS data name.

QoS vif types include the following:

  • vif_inbound_average lets you specify the average rate of inbound (receive) traffic, in kilobytes/sec.

  • vif_outbound_average lets you specify the average rate of outbound (transmit) traffic, in kilobytes/sec.

  • Optional: vif_inbound_peak and vif_outbound_peak specify the maximum rate of inbound and outbound traffic, respectively, in kilobytes/sec.

  • Optional: vif_inbound_burst and vif_outbound_peak specify the amount of kilobytes that can be received or transmitted, respectively, in a single burst at the peak rate.

Details for various QoS parameters for libvirt can be found at http://libvirt.org/formatnetwork.html.

The following example shows an inbound average of 800 kilobytes/sec, a peak of 1000 kilobytes/sec, and a burst amount of 30 kilobytes.

The following is an example of specified outbound parameters:

After the Nova flavor is configured for QoS, a virtual machine instance can be created, using either Horizon or CLI. The instance will have network settings corresponding to the nova flavor-key, as in the following:

Limitations

  • The stock libvirt does not support rate limiting of ethernet interface types. Consequently, settings like those in the example for the guest interface will not result in any tc qdisc settings for the corresponding tap device in the host. For more details, refer to issue #1367095 in Launchpad.net, where you can find patches and instructions to make libvirt work for network rate limiting of virtual machine interfaces.

  • The nova flavor-key rxtx_factor takes a float as an input and acts as a scaling factor for receive (inbound) and transmit (outbound) throughputs. This key is only available to Neutron extensions (private extensions). The Contrail Neutron plugin doesn’t implement this private extension. Consequently, setting the nova flavor-key rxtx_factor will not have any effect on the QoS setting of the network interface(s) of any virtual machine created with that nova flavor.

  • The outbound rate limits of a virtual machine interface are not strictly achieved. The outbound throughput of a virtual machine network interface is always less than the average outbound limit specified in the virtual machine's libvirt configuration file. The same behavior is also seen when using a Linux bridge.