Talk was given in OpenStack summit in Vancouver. Together with Miguel Lavalle we were talking about new features and future plans for Quality of Service in OpenStack Neutron.
6. openstack network qos rule create --type bandwidth-limit
--max-kbps 1024
--max-burst-kbit 512
Summit_Policy
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| direction | egress |
| id | f9bb1173-1bf0-4942-8932-a69b61ef5b52 |
| max_burst_kbps | 512 |
| max_kbps | 1024 |
| name | None |
| project_id | |
+----------------+--------------------------------------+
6
Neutron QoS - usage
Create QoS rule in policy
7. openstack port set --qos-policy Summit_Policy
aa42976b-03d0-4fbb-90f8-fa7b88da8a2e
openstack port show aa42976b-03d0-4fbb-90f8-fa7b88da8a2e
+-----------------------+-------------------------------------------------+
| Field | Value |
+-----------------------+-------------------------------------------------+
| created_at | 2018-05-07T14:51:49Z |
| device_id | 80afc6fb-12a1-4bae-8cd4-6835aa819227 |
| id | aa42976b-03d0-4fbb-90f8-fa7b88da8a2e |
| mac_address | fa:16:3e:4e:e7:bc |
| network_id | c8714b0a-f960-4db3-bbf6-f6dddb5a6843 |
| project_id | 24f901074d52470da2c641e26c2753e1 |
| qos_policy_id | 8a495fea-e617-45f6-82e6-a61f7860c5cc |
| revision_number | 8 |
| status | ACTIVE |
| updated_at | 2018-05-09T20:36:11Z |
+-----------------------+-------------------------------------------------+
7
Neutron QoS - usage
Attach QoS policy to port (or network)
8. Open vSwitch SR-IOV Linux Bridge L3 agent
Bandwidth limit Egress / Ingress Egress (1) Egress / Ingress Egress / Ingress (3)
Minimum
Bandwidth
- Egress (2) - -
DSCP Marking Egress - Egress -
8
Neutron QoS - available rule types
1. Max burst parameter is skipped because it's not supported by ip tool
2. Best effort - scheduler is not aware about this minimum bandwidth requirement for ports
3. Limit for Floating IP
9. openstack network qos rule create
--type bandwidth-limit
--max-kbps 512
--max-burst-kbit 128
--ingress
Summit_Policy
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| direction | ingress |
| id | f5fc67f8-83a2-40be-ad12-d15fbe29381f |
| max_burst_kbps | 128 |
| max_kbps | 512 |
| name | None |
| project_id | |
+----------------+--------------------------------------+
9
Neutron QoS - bandwidth limit rule
Rule API
20. 20
Rules validation - old way
Report of available rule types
Example for deployment with openvswitch and sriovnicswitch mechanism
drivers
openstack network qos rule type list
+-----------------+
| Type |
+-----------------+
| bandwidth_limit | (- supported by both drivers)
+-----------------+
21. 21
Rules validation - old way - problems
● There was no real validation - it was only information for
user,
● Very limited range of rule types available in mixed
deployments,
● Some attributes of rules have big impact of backend
implementation (e.g. direction)
22. 22
Rules validation - new way
Report of available rule types
Example for deployment with openvswitch and sriovnicswitch mechanism
drivers:
openstack network qos rule type list
+-------------------+
| Type |
+-------------------+
| bandwidth_limit | (- supported by both drivers)
| dscp_marking | (- supported by openvswitch driver)
| minimum_bandwidth | (- supported by sriovnicswitch driver)
+-------------------+
23. 23
Rules validation - new way
Report details of rule type
Example for deployment with openvswitch and sriovnicswitch mechanism
drivers
+----------------+------------------------------------------------------------------+
| Field | Value |
+----------------+------------------------------------------------------------------+
| drivers | {'name': 'openvswitch', |
| | 'supported_parameters': [{'parameter_values': [0, 8, .., 56], |
| | 'parameter_type': 'choices', |
| | 'parameter_name': 'dscp_mark'}]}] |
| rule_type_name | dscp_marking |
+----------------+------------------------------------------------------------------+
24. 24
Rules validation - new way - validation
Validation if QoS policy can be applied to port (ports) during:
● Create/Update QoS rule,
● Create/Update port,
● Update network
Returns HTTP Conflict (409) error in case if rule(s) can’t be
applied for at least one port
25. 25
Rules validation - new way - validation
openstack network qos policy show DSCP_MARK_Policy
+-------------+------------------------------------------+
| Field | Value |
+-------------+------------------------------------------+
| name | DSCP_MARK_Policy |
| rules | [{u'type': u'dscp_marking'] |
+-------------+------------------------------------------+
openstack network qos policy show Min_BW_Policy
+-------------+------------------------------------------+
| Field | Value |
+-------------+------------------------------------------+
| name | Min_BW_Policy |
| rules | [{u'type': u'minimum_bandwidth'] |
+-------------+------------------------------------------+
openstack port show 5cac029f-dbac-4c04-ab81-a6ab8faefc43 -c binding_vif_type -c id
+------------------+--------------------------------------+
| Field | Value |
+------------------+--------------------------------------+
| binding_vif_type | ovs |
| id | 5cac029f-dbac-4c04-ab81-a6ab8faefc43 |
+------------------+--------------------------------------+
26. 26
Rules validation - new way - validation
openstack port set 5cac029f-dbac-4c04-ab81-a6ab8faefc43 --qos-policy Min_BW_Policy
ConflictException: 409
openstack port show 5cac029f-dbac-4c04-ab81-a6ab8faefc43 -c qos_policy_id -c id
+---------------+--------------------------------------+
| Field | Value |
+---------------+--------------------------------------+
| id | 5cac029f-dbac-4c04-ab81-a6ab8faefc43 |
| qos_policy_id | None |
+---------------+--------------------------------------+
Apply QoS policy with minimum bandwidth rule (NOT
supported by openvswitch driver) - Fails
27. 27
Rules validation - new way - validation
openstack port set 5cac029f-dbac-4c04-ab81-a6ab8faefc43 --qos-policy DSCP_MARK_Policy
openstack port show 5cac029f-dbac-4c04-ab81-a6ab8faefc43 -c qos_policy_id -c id
+---------------+--------------------------------------+
| Field | Value |
+---------------+--------------------------------------+
| id | 5cac029f-dbac-4c04-ab81-a6ab8faefc43 |
| qos_policy_id | 4d8cf13e-2a34-43a2-a642-53b5d4dd898d |
+---------------+--------------------------------------+
Apply QoS policy with DSCP Marking rule (supported by
openvswitch driver) - OK
28. New features in Queens release:
bandwidth limit rules for floating IPs
29. 29
Overview
● Only bandwidth limit rules for floating IPs
● Both directions available: egress and ingress
● Rules are implemented as tc filters applied to:
○ qg device in qr name space for legacy and HA routers
○ rfp device in qr name space for DVR local routers
○ qg device in snat name space for DVR edge routers
● Filters are applied when floating ip is associated to a port
36. 36
What do we mean by strict minimum
bandwidth support?
● Enforcement of minimum QoS policy minimum bandwidth
rules in the data plane
○ This can be done by Neutron alone
○ Egress minimum bandwidth rules are currently available
for SR-IOV back-end
○ Plans to implement for ingress and for other back-ends:
OVS, LB, etc.
37. 37
What do we mean by strict minimum
bandwidth support? (cont.)
● Avoid oversubscription of interfaces when scheduling VMs
and their ports in compute hosts
○ This will require cooperation between Neutron and
Nova
○ Neutron will influence Nova’s scheduling decision
○ Nova will influence Neutron’s port binding process
38. 38
Limitation of first experimental release
● Ports will have to be created and associated to QoS policy
by user and then provided in the VM boot request
○ This is because currently, when booting an instance,
Nova creates its ports in the compute host, after the
scheduling decision has been made
○ Plans exist to move port creation by Nova to the
Conductor, i.e., before the scheduling decision
39. 39
Components of strict minimum bandwidth
support
● Neutron communicates to Nova the interfaces and
bandwidth inventory using the Placement API
● User sets in Neutron the minimum bandwidth requirements
of a port
● Neutron communicates to Nova the minimum bandwidth
requirements of a port
● Nova communicates to Neutron the selected host and the
backend within that host
41. 41
Placement data for each compute host
Compute RP
name = hostname
Agent RP
(OVS agent)
uuid = agent_uuid
Physical NIC RP
uuid = uuid5(hostname:br0)
traits: physnet_1, VNIC_TYPE_NORMAL
inventory:
{ingress_kilobits_per_sec: 10000,
egrees_kilobits_per_sec: 10000}
Physical NIC RP
uuid = uuid5(hostname:br1)
traits: physnet_2, VNIC_TYPE_NORMAL
inventory:
{ingress_kilobits_per_sec: 10000,
egrees_kilobits_per_sec: 10000}
Agent RP
(SR-IOV agent)
uuid = agent_uuid
Physical NIC RP
uuid = uuid5(hostname:br0)
traits: physnet_3, VNIC_TYPE_DIRECT
inventory:
{ingress_kilobits_per_sec: 10000,
egrees_kilobits_per_sec: 10000}
42. Communicating to Nova interfaces and
bandwidth inventories
ReST
Neutron Server Placement ServiceAgent RPC
Agent heartbeat ‘configurations’ with:
- Bridge / interface mappings
- Resource providers inventories
- Resource providers traits
Config
43. openstack network qos rule create
--type minimum-bandwidth
--min-kbps 512
--egress
Summit_Policy
+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| direction | egress |
| id | 5e5969f2-66f8-4bed-9905-b31b33902189 |
| min_kbps | 512 |
| name | None |
+------------+--------------------------------------+
openstack port set --qos-policy Summit_Policy Summit_Port
43
User sets in Neutron the minimum bandwidth
requirements of a port
44. Neutron communicates to Nova the minimum
bandwidth requirements of a port
{
“port”: {
“status”: “ACTIVE”,
“name”: “Summit_Port”,
...
“device_id”: “5e3898d7-11be-483e-9732-b2f5eccd2b2e”,
“resource_request": {
"resources": {
"NET_BANDWIDTH_INGRESS_KILOBITS_PER_SECOND": 1000,
"NET_BANDWIDTH_EGRESS_KILOBITS_PER_SECOND": 1000,
}
"required": [
"CUSTOM_PHYSNET_NET0",
"CUSTOM_VNIC_TYPE_NORMAL”
]
}
}
}
45. Nova communicates to Neutron the selected
host and backend
{
“port”: {
“binding:host_id”: “allinone”,
“binding:profile”: {
“allocation”: “rp uuid”
}
}
}