Container Network QoS Management
Container network QoS
CCE offers two QoS management methods for container networks: bandwidth control and egress packet priority management. You can manage container network QoS by applying annotations to pods.
1. Bandwidth management
The bandwidth management configuration is as follows:
| annotation | Description | Example |
|---|---|---|
kubernetes.io/ingress-bandwidth |
Container ingress bandwidth | 10M |
kubernetes.io/egress-bandwidth |
Container egress bandwidth | 10M |
1.1 Bandwidth limit units
Bandwidth management supports the following units:
B: BytesK/KB/KIB: KilobyteM/MB/MIB: MegabytesG/GB/GIB: GigabyteT/TB/TIB: Terabyte
1.2 Bandwidth management principles
The CCE container network currently only supports bandwidth management using tc. By configuring the tbf qdisc for ingress and egress of the container network interface card via tc, rate limiting for container network ingress and egress is achieved. For details about tbf, refer to the Linux man manual.
2. Egress packet priority management
The egress packet priority management configuration is as follows:
| annotation | Description | Example |
|---|---|---|
cce.baidubce.com/egress-priority |
Container egress packet priority | Burstable |
2.1 Egress packet priority value
Guaranteed: The highest priority, used for scenarios requiring ultra-low latencyBurstable: Normal priority, used for scenarios requiring high throughputBestEffort: Low priority, used for scenarios insensitive to latency
2.2 Egress packet priority management principles
CCE container network currently only supports egress packet priority management via tc. For instance, in VPC-ENI scenarios, if egress packet priority is set, the tc configuration example on ENI would be: cce-eni-0
- qdisc mq 1: dev cce-eni-0 root
- qdisc prio 8001: dev cce-eni-0 parent 1:2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
-
Plain Text
1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 terminal flowid ??? not_in_hw match ac16161e/ffffffff at 12 - qdisc prio 8002: dev cce-eni-0 parent 1:1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
-
Plain Text
1 filter protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 terminal flowid ??? not_in_hw match ac16161e/ffffffff at 12
By configuring an mq qdisc for the ENI network interface card, you can set up a prio qdisc for each mq queue and define filters for each prio queue to manage egress packet priorities in the container network.
Usage restrictions
- Annotations must be configured during pod creation, as dynamic modification is not supported.
- Network QoS should be utilized alongside cce-network-v2 version 2.9.0 or later.
- QoS is currently supported only on Linux operating systems and requires a kernel version of 3.10 or higher.
