CoDel is a modern Active Queue Management (AQM) algorithm. It was proposed as part of the efforts to fight BufferBloat - "just one piece of the solution". According to the claims of its authors, and in contrast to other AQM methods such as Random Early Detection (RED), CoDel requires no tuning, can be implemented efficiently on current hardware architectures, and works well over a wide range of bandwidth/delay/congestion regimes, including situations where the link rate varies dynamically, such as with wireless and/or mobile networks.
See fq_codel
for a combination of CoDel with fair queueing. fq_codel
is recommended by many experts as a general-purpose queueing mechanism to prevent BufferBloat at bottlenecks.
CoDel Strategy
CoDel's strategy is based on separating queue occupancy into "good queue" (buffering of transient bursts) from "bad queue" (standing queues that just create excess delay). The heuristic for separating good from bad queue is based on "the minimum of the queue length over a sliding time window that’s longer than the nominal RTT".
In another departure from RED and most other AQM strategies, CoDel takes action at dequeue time. When a packet is added to the queue (enqueue), it is simply tagged with a timestamp and queued (unless the buffer is full, in which case it is dropped by necessity). Because of these timestamps, and because it works at dequeue time, CoDel can use the actual packet-sojourn time as the basis for the drop/forward decision. This makes it robust against changes in egress rate, and links the behavior of the algorithm with the actual user-visible performance (delay).
Implementations
CoDel has been implemented as a codel
module by Eric Dumazet (based on a prototype by Dave Taht) for the Linux kernel and is included in the Linux kernel since the 3.5 release. The same kernel versions also contain fq_codel
, which combines fair queueing with CoDel. All of this is included and supported in CeroWRT, a variant of OpenWRT from the BufferBloat community, which makes it relatively easy to test this if you have a supported broadband/wireless router. Basic codel
works without any userspace changes, but in order to read CoDel-related statistics, a new version of the tc (traffic control) tools is required, which can be found in the Git repository for the iproute2 package, according to the instructions on the Bufferbloat CoDel wiki page.
There are also implementations of CoDel for the NS2 and NS3 network simulators, which have been used in early evaluation of the algorithm.
Simon Perreault has written an implementation of CoDel for OpenBSD, but apparently it wasn't accepted for worries about the overhead at taking a timestamp for each packet dequeue. Recently, Ermal Luçi offeredapatch to FreeBSD's altq
system that implements CoDel.
References
- K. Nichols, V. Jacobson, Controlling Queue Delay, ACM Queue, May 2012
- K. Nichols, V. Jacobson, Commented CoDel pseudo-code implementation (Appendix to above ACM Queue article)
- K. Nichols, V. Jacobson, Notes on the Algorithm and its Implementation, part of the CoDel web site on pollere.net
- J. Gettys, A Milestone Reached: CoDel is in Linux!, Jim Gettys' blog, May 2012
- CoDel wiki, Bufferbloat project
- CoDel mailing listandarchives, Bufferbloat project
- E. Dumazet, CoDel implementation for the Linux kernel, lwn.net article 496502, May 2012
- K. Nichols, CoDel, presentation slides, presented by V. Jacobson (A/V recording) to the Transport Area Open Meeting at IETF 84, 30 July 2012
- RFC 8289, Controlled Delay Active Queue Management, Kathleen Nichols, Van Jacobson, Andrew McGregor, Janardhan Iyengar, January 2018
- RFC 8290, The Flow Queue CoDel Packet Scheduler and Active Queue Management Algorithm, Toke Heoiland-Joergensen, Paul McKenney, Dave Taht, Jim Gettys, Eric Dumazet, January 2018
– SimonLeinen - 2012-07-12 - 2017-10-14