CoDel(8)
๐ CoDel(8) โจ Linux Manual Page โจ
๐ฆ NAME
CoDel is a Controlled-Delay Active Queue Management algorithm ๐
๐ SYNOPSIS
tc qdisc ... codel [ limit PACKETS ] [ target TIME ] [ interval TIME ] [ ecn | noecn ] [ ce_threshold TIME ]
๐ธ DESCRIPTION
okay so CoDel (pronounced "coddle" ๐ซถ) is an adaptive "no-knobs" active queue management algorithm (AQM) scheme. It was built to fix the problems RED and its variants had, and it was designed with these goals in mind:
- It should be parameterless. โจ
- It should keep delays low while still letting bursts of traffic through. ๐
- It should control delay. ๐ง
- It should adapt dynamically to changing link rates with no impact on utilization. ๐
- It should be simple and efficient, and it should scale from simple to complex routers. ๐
๐ง ALGORITHM
CoDel comes with three major innovations ๐ฅ. First, instead of looking at queue size or queue average, it uses the local minimum queue as a measure of the standing/persistent queue. Second, it uses a single state-tracking variable for the minimum delay, so it knows where it stands relative to the standing queue delay. Third, instead of measuring queue size in bytes or packets, it measures packet-sojourn time in the queue. Iconic behavior honestly ๐ญ
CoDel measures the minimum local queue delay (aka the standing queue delay) and compares it to the given acceptable queue delay target. As long as the minimum queue delay is less than target, or the buffer has fewer than MTU worth of bytes, packets are not dropped. CoDel enters a dropping mode when the minimum queue delay has been over target for longer than interval. In this mode, packets get dropped at different drop times, which are set by a control law. That control law makes sure the packet drops cause a linear change in throughput. Once the minimum delay goes back below target, packets stop getting dropped. Periodt ๐
More details are in the paper cited below ๐
๐จ PARAMETERS
๐ง limit
limit is the hard limit on the real queue size. Once this limit is reached, incoming packets get dropped. If you lower the value, packets get dropped until the new limit is met. The default is 1000 packets ๐
๐ง target
target is the acceptable minimum standing/persistent queue delay. This minimum delay is found by tracking the local minimum queue delay that packets experience. The default and recommended value is 5ms ๐
๐ง interval
interval makes sure the measured minimum delay doesn't get too stale. The minimum delay has to be experienced within the last epoch of length interval. It should be set on the order of the worst-case RTT through the bottleneck, so endpoints have enough time to react ๐ฆ. The default value is 100ms โฑ๏ธ
๐ง ecn | noecn
ecn lets CoDel mark packets instead of dropping them. If ecn is enabled, you can use noecn to turn it off, and vice versa. By default, ecn is turned off ๐
๐ง ce_threshold
ce_threshold sets a threshold above which all packets get marked with ECN Congestion Experienced. This is super useful for DCTCP-style congestion control algorithms that need marking at very shallow queueing thresholds ๐ง
๐ EXAMPLES
Okay, examples time, bestie ๐
# tc qdisc add dev eth0 root codel
# tc -s qdisc show
qdisc codel 801b: dev eth0 root refcnt 2 limit 1000p target 5.0ms
interval 100.0ms
Sent 245801662 bytes 275853 pkt (dropped 0, overlimits 0 requeues
24)
backlog 0b 0p requeues 24
count 0 lastcount 0 ldelay 2us drop_next 0us
maxpacket 7306 ecn_mark 0 drop_overlimit 0
# tc qdisc add dev eth0 root codel limit 100 target 4ms interval 30ms
ecn
# tc -s qdisc show
qdisc codel 801c: dev eth0 root refcnt 2 limit 100p target 4.0ms
interval 30.0ms ecn
Sent 237573074 bytes 268561 pkt (dropped 0, overlimits 0 requeues 5)
backlog 0b 0p requeues 5
count 0 lastcount 0 ldelay 76us drop_next 0us
maxpacket 2962 ecn_mark 0 drop_overlimit 0
๐ SEE ALSO
๐ SOURCES
Kathleen Nichols and Van Jacobson, "Controlling Queue Delay", ACM Queue, http://queue.acm.org/detail.cfm?id=2209336 ๐
๐ฉโ๐ป AUTHORS
CoDel was implemented by Eric Dumazet and David Taht. This manpage was written by Vijay Subramanian. If you spot any mistakes, please report corrections to the Linux Networking mailing list <netdev@vger.kernel.org> ๐
That's the whole tea, bestie! ๐ This page came from iproute2, dated 23 May 2012, and it's CoDel(8) forever โจ๐ฆ๐
๐ฆ where this page comes from
- alpine 3.22: iproute2-doc 6.15.0-r0 ยท GPL-2.0-or-later
- alpine 3.23: iproute2-doc 6.17.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute-tc 7.0.0-2.el10 ยท GPL-2.0-or-later
- centos-stream 9: iproute-tc 6.17.0-3.el9 ยท GPL-2.0-or-later
- debian trixie: iproute2 6.15.0-1 ยท GPL-2.0-only
- fedora 43: iproute-tc 6.14.0-2.fc43 ยท GPL-2.0-or-later
- fedora 44: iproute-tc 6.17.0-2.fc44 ยท GPL-2.0-or-later
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2
- ubuntu questing: iproute2 6.16.0-1ubuntu2.1 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2.2
- ubuntu resolute: iproute2 6.19.0-1ubuntu1 ยท GPL-2.0-only
- ubuntu resolute: iproute2 6.19.0-1ubuntu1.1 ยท GPL-2.0-only
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms