CoDel — Controlled‑Delay Active Queue Management algorithm
| Use Case | Command | Description |
|---|---|---|
| Apply CoDel with defaults | tc qdisc add dev eth0 root codel |
Adds CoDel on eth0 with default limit 1000p, target 5ms, interval 100ms |
| Apply CoDel with custom parameters + ECN | tc qdisc add dev eth0 root codel limit 100 target 4ms interval 30ms ecn |
Limits queue to 100p, target 4ms, interval 30ms, marks packets with ECN instead of dropping |
| Display CoDel statistics | tc -s qdisc show |
Shows sent bytes, dropped, backlog, delay, etc. |
| Set CE threshold for DCTCP | tc qdisc ... codel ce_threshold value |
Marks packets with ECN Congestion Experienced above threshold |
tc qdisc ... codel [ limit PACKETS ] [ target TIME ] [ interval TIME ]
[ ecn | noecn ] [ ce_threshold TIME ]
CoDel (pronounced "coddle") is an adaptive "no‑knobs" active queue management algorithm (AQM) scheme developed to address the shortcomings of RED and its variants. It was developed with the following goals in mind:
CoDel comes with three major innovations. Instead of using 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 of the minimum delay to see where it is relative to the standing queue delay. Third, instead of measuring queue size in bytes or packets, it is measured in packet‑sojourn time in the queue.
CoDel measures the minimum local queue delay (i.e., standing queue delay) and compares it to the value of the given acceptable queue delay target. As long as the minimum queue delay is less than target or the buffer contains fewer than MTU worth of bytes, packets are not dropped. CoDel enters a dropping mode when the minimum queue delay has exceeded target for a time greater than interval. In this mode, packets are dropped at different drop times which is set by a control law. The control law ensures that the packet drops cause a linear change in the throughput. Once the minimum delay goes below target, packets are no longer dropped.
Additional details can be found in the paper cited below.
Hard limit on the real queue size. When this limit is reached, incoming packets are dropped. If the value is lowered, packets are dropped so that the new limit is met. Default is 1000 packets.
Acceptable minimum standing/persistent queue delay. Identified by tracking the local minimum queue delay that packets experience. Default and recommended value is 5ms.
Ensures the measured minimum delay does not become too stale. The minimum delay must be experienced in the last epoch of length interval. Should be set on the order of the worst‑case RTT through the bottleneck. Default value is 100ms.
Can be used to mark packets instead of dropping them. If ecn has been enabled, noecn can be used to turn it off and vice‑a‑versa. By default, ecn is turned off.
Sets a threshold above which all packets are marked with ECN Congestion Experienced. Useful for DCTCP‑style congestion control algorithms that require marking at very shallow queueing thresholds.
# 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
CoDel was implemented by Eric Dumazet and David Taht. This manpage was written by Vijay Subramanian. Please report corrections to the Linux Networking mailing list <netdev AT vger.org>.
Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-16 09:04 @2600:1f28:365:80b0:7cb9:fb:26c1:e368
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)