1CoDel(8) Linux CoDel(8)
2
3
4
6 CoDel - Controlled-Delay Active Queue Management algorithm
7
9 tc qdisc ... codel [ limit PACKETS ] [ target TIME ] [ interval TIME ]
10 [ ecn | noecn ]
11
12
14 CoDel (pronounced "coddle") is an adaptive "no-knobs" active queue man‐
15 agement algorithm (AQM) scheme that was developed to address the short‐
16 comings of RED and its variants. It was developed with the following
17 goals in mind:
18 o It should be parameterless.
19 o It should keep delays low while permitting bursts of traffic.
20 o It should control delay.
21 o It should adapt dynamically to changing link rates with no impact on
22 utilization.
23 o It should be simple and efficient and should scale from simple to
24 complex routers.
25
26
28 CoDel comes with three major innovations. Instead of using queue size
29 or queue average, it uses the local minimum queue as a measure of the
30 standing/persistent queue. Second, it uses a single state-tracking
31 variable of the minimum delay to see where it is relative to the stand‐
32 ing queue delay. Third, instead of measuring queue size in bytes or
33 packets, it is measured in packet-sojourn time in the queue.
34
35 CoDel measures the minimum local queue delay (i.e. standing queue
36 delay) and compares it to the value of the given acceptable queue delay
37 target. As long as the minimum queue delay is less than target or the
38 buffer contains fewer than MTU worth of bytes, packets are not dropped.
39 Codel enters a dropping mode when the minimum queue delay has exceeded
40 target for a time greater than interval. In this mode, packets are
41 dropped at different drop times which is set by a control law. The con‐
42 trol law ensures that the packet drops cause a linear change in the
43 throughput. Once the minimum delay goes below target, packets are no
44 longer dropped.
45
46 Additional details can be found in the paper cited below.
47
48
50 limit
51 hard limit on the real queue size. When this limit is reached, incoming
52 packets are dropped. If the value is lowered, packets are dropped so
53 that the new limit is met. Default is 1000 packets.
54
55
56 target
57 is the acceptable minimum standing/persistent queue delay. This minimum
58 delay is identified by tracking the local minimum queue delay that
59 packets experience. Default and recommended value is 5ms.
60
61
62 interval
63 is used to ensure that the measured minimum delay does not become too
64 stale. The minimum delay must be experienced in the last epoch of
65 length interval. It should be set on the order of the worst-case RTT
66 through the bottleneck to give endpoints sufficient time to react.
67 Default value is 100ms.
68
69
70 ecn | noecn
71 can be used to mark packets instead of dropping them. If ecn has been
72 enabled, noecn can be used to turn it off and vice-a-versa. By default,
73 ecn is turned off.
74
75
77 # tc qdisc add dev eth0 root codel
78 # tc -s qdisc show
79 qdisc codel 801b: dev eth0 root refcnt 2 limit 1000p target 5.0ms
80 interval 100.0ms
81 Sent 245801662 bytes 275853 pkt (dropped 0, overlimits 0 requeues
82 24)
83 backlog 0b 0p requeues 24
84 count 0 lastcount 0 ldelay 2us drop_next 0us
85 maxpacket 7306 ecn_mark 0 drop_overlimit 0
86
87 # tc qdisc add dev eth0 root codel limit 100 target 4ms interval 30ms
88 ecn
89 # tc -s qdisc show
90 qdisc codel 801c: dev eth0 root refcnt 2 limit 100p target 4.0ms
91 interval 30.0ms ecn
92 Sent 237573074 bytes 268561 pkt (dropped 0, overlimits 0 requeues
93 5)
94 backlog 0b 0p requeues 5
95 count 0 lastcount 0 ldelay 76us drop_next 0us
96 maxpacket 2962 ecn_mark 0 drop_overlimit 0
97
98
99
101 tc(8), tc-red(8)
102
103
105 o Kathleen Nichols and Van Jacobson, "Controlling Queue Delay", ACM
106 Queue, http://queue.acm.org/detail.cfm?id=2209336
107
108
110 CoDel was implemented by Eric Dumazet and David Taht. This manpage was
111 written by Vijay Subramanian. Please reports corrections to the Linux
112 Networking mailing list <netdev@vger.kernel.org>.
113
114
115
116iproute2 23 May 2012 CoDel(8)