Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 11. Configure Quality-of-Service (QoS)


Red Hat OpenStack Platform 11 introduces support for network quality-of-service (QoS) policies. These policies allow OpenStack administrators to offer varying service levels by applying rate limits to egress traffic for instances. As a result of implementing a QoS policy, any traffic that exceeds the specified rate is consequently dropped.

11.1. QoS Policy Scope

QoS policies are applied to individual ports, or to a particular tenant network, where ports with no specific policy attached will inherit the policy.

11.2. QoS Policy Management

QoS policies can be dynamically applied, modified, or removed. This example manually creates a bandwidth limiting rule and applies it to a port.

  1. Review the list of tenants and determine the id of where you need to create QoS policy:

    # openstack project list
    +----------------------------------+----------+
    | ID                               | Name     |
    +----------------------------------+----------+
    | 4b0b98f8c6c040f38ba4f7146e8680f5 | auditors |
    | 519e6344f82e4c079c8e2eabb690023b | services |
    | 80bf5732752a41128e612fe615c886c6 | demo     |
    | 98a2f53c20ce4d50a40dac4a38016c69 | admin    |
    +----------------------------------+----------+
    Copy to Clipboard Toggle word wrap
  2. Create a QoS policy named bw-limiter in the admin tenant:

    # neutron qos-policy-create 'bw-limiter' --tenant-id 98a2f53c20ce4d50a40dac4a38016c69
    Copy to Clipboard Toggle word wrap
  3. Configure the policing rules for the bw-limiter policy:

    # neutron qos-bandwidth-limit-rule-create bw-limiter --max_kbps 3000 --max_burst_kbps 3000
    Copy to Clipboard Toggle word wrap
  4. Configure a neutron port to apply the bw-limiter policy:

    # neutron port-update <port id> --qos-policy bw-limiter
    Copy to Clipboard Toggle word wrap
  5. Review the QoS rule. For example:

    # neutron qos-rule-show 9be535c3-daa2-4d7b-88ea-e8de16
    
    +-------------------+---------------------------------+
    | Field             | Value                           |
    +-------------------+---------------------------------+
    | id                | 9be535c3-daa2-4d7b-88ea-e8de16  |
    | rule_type         | bandwidth_limit                 |
    | description       |                                 |
    | max_kbps          | 3000                            |
    | max_burst_kbps    | 300                             |
    +-------------------+---------------------------------+
    Copy to Clipboard Toggle word wrap

These values allow you to configure the policing algorithm accordingly:

  • max_kbps - the maximum rate (in Kbps) that the instance is allowed to send.
  • max_burst_kbps - the maximum amount of data (in kbits) that the port could send in a instant if the token buffer was full. The token buffer is replenished at a "max_kbps" rate.

11.3. DSCP Marking for Egress Traffic

Differentiated Services Code Point (DSCP) allows you to to implement QoS on your network by embedding relevant values in the IP headers. OpenStack Networking (neutron) QoS policies can now use DSCP marking to manage egress traffic on neutron ports and networks. At present, DSCP is only available for VLAN and flat provider networks using Open vSwitch (OVS); support for VXLAN is expected to follow.

In this implementation, a policy is first created, then DSCP rules are defined and applied to the policy. These rules use the --dscp-mark parameter, which specifies the decimal value of a DSCP mark. For example:

1. Create a new QoS policy:

neutron qos-policy-create qos-web-servers --tenant-id 98a2f53c20ce4d50a40dac4a38016c69
Copy to Clipboard Toggle word wrap

2. Create a DSCP rule and apply it to the qos-web-servers policy, using DSCP mark 18:

neutron qos-dscp-marking-rule-create qos-web-servers --dscp-mark 18
Created a new dscp_marking_rule:
+-----------+--------------------------------------+
| Field     | Value                                |
+-----------+--------------------------------------+
| dscp_mark | 18                                   |
| id        | d7f976ec-7fab-4e60-af70-f59bf88198e6 |
+-----------+--------------------------------------+
Copy to Clipboard Toggle word wrap

3. View the DSCP rules for QoS policy qos-web-servers:

neutron qos-dscp-marking-rule-list qos-web-servers
+-----------+--------------------------------------+
| dscp_mark | id                                   |
+-----------+--------------------------------------+
|        18 | d7f976ec-7fab-4e60-af70-f59bf88198e6 |
+-----------+--------------------------------------+
Copy to Clipboard Toggle word wrap

4. View the details of the DSCP rule assigned to policy qos-web-servers:

neutron qos-dscp-marking-rule-show d7f976ec-7fab-4e60-af70-f59bf88198e6 qos-web-servers
+-----------+--------------------------------------+
| Field     | Value                                |
+-----------+--------------------------------------+
| dscp_mark | 18                                   |
| id        | d7f976ec-7fab-4e60-af70-f59bf88198e6 |
+-----------+--------------------------------------+
Copy to Clipboard Toggle word wrap

5. Change the DSCP value assigned to a rule:

neutron qos-dscp-marking-rule-update d7f976ec-7fab-4e60-af70-f59bf88198e6 qos-web-servers --dscp-mark 22
Updated dscp_marking_rule: d7f976ec-7fab-4e60-af70-f59bf88198e6
Copy to Clipboard Toggle word wrap

6. Delete a DSCP rule:

neutron qos-dscp-marking-rule-delete d7f976ec-7fab-4e60-af70-f59bf88198e6 qos-web-servers
Deleted dscp_marking_rule(s): d7f976ec-7fab-4e60-af70-f59bf88198e6
Copy to Clipboard Toggle word wrap

11.4. RBAC for QoS Policies

Red Hat OpenStack Platform 11 adds Role-based Access Control (RBAC) for QoS policies. As a result, you can now make QoS policies available to certain projects.

For example, you can now create a QoS policy that allows for lower-priority network traffic, and have it only apply to certain projects. In the following command below, the bw-limiter policy created previously is assigned to the demo tenant:

# neutron rbac-create 'bw-limiter' --type qos-policy --target-tenant 80bf5732752a41128e612fe615c886c6 --action access_as_shared
Copy to Clipboard Toggle word wrap
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat