man-pages/man8/tc-codel.8.html
2021-03-31 01:06:50 +01:00

205 lines
7.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of CoDel</TITLE>
</HEAD><BODY>
<H1>CoDel</H1>
Section: Linux (8)<BR>Updated: 23 May 2012<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
CoDel - Controlled-Delay Active Queue Management algorithm
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>tc qdisc ... codel</B>
[
<B>limit</B>
PACKETS ] [
<B>target</B>
TIME ] [
<B>interval</B>
TIME ] [
<B>ecn</B>
|
<B>noecn</B>
] [
<B>ce_threshold</B>
TIME ]
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
CoDel (pronounced &quot;coddle&quot;) is an adaptive &quot;no-knobs&quot; active queue management
algorithm (AQM) scheme that was developed to address the shortcomings of
RED and its variants. It was developed with the following goals
in mind:
<BR>&nbsp;o&nbsp;It&nbsp;should&nbsp;be&nbsp;parameterless.
<BR>&nbsp;o&nbsp;It&nbsp;should&nbsp;keep&nbsp;delays&nbsp;low&nbsp;while&nbsp;permitting&nbsp;bursts&nbsp;of&nbsp;traffic.
<BR>&nbsp;o&nbsp;It&nbsp;should&nbsp;control&nbsp;delay.
<BR>&nbsp;o&nbsp;It&nbsp;should&nbsp;adapt&nbsp;dynamically&nbsp;to&nbsp;changing&nbsp;link&nbsp;rates&nbsp;with&nbsp;no&nbsp;impact&nbsp;on
utilization.
<BR>&nbsp;o&nbsp;It&nbsp;should&nbsp;be&nbsp;simple&nbsp;and&nbsp;efficient&nbsp;and&nbsp;should&nbsp;scale&nbsp;from&nbsp;simple&nbsp;to
complex routers.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>ALGORITHM</H2>
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.
<P>
CoDel measures the minimum local queue delay (i.e. standing queue delay) and
compares it to the value of the given acceptable queue delay
<B>target.</B>
As long as the minimum queue delay is less than
<B>target</B>
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
<B>target</B>
for a time greater than
<B>interval.</B>
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
<B>target,</B>
packets are no longer dropped.
<P>
Additional details can be found in the paper cited below.
<P>
<A NAME="lbAF">&nbsp;</A>
<H2>PARAMETERS</H2>
<A NAME="lbAG">&nbsp;</A>
<H3>limit</H3>
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.
<P>
<A NAME="lbAH">&nbsp;</A>
<H3>target</H3>
is the acceptable minimum standing/persistent queue delay. This minimum delay
is identified by tracking the local minimum queue delay that packets experience.
Default and recommended value is 5ms.
<P>
<A NAME="lbAI">&nbsp;</A>
<H3>interval</H3>
is used to ensure that the measured minimum delay does not become too stale. The
minimum delay must be experienced in the last epoch of length
<B>interval.</B>
It should be set on the order of the worst-case RTT through the bottleneck to
give endpoints sufficient time to react. Default value is 100ms.
<P>
<A NAME="lbAJ">&nbsp;</A>
<H3>ecn | noecn</H3>
can be used to mark packets instead of dropping them. If
<B>ecn</B>
has been enabled,
<B>noecn</B>
can be used to turn it off and vice-a-versa. By default,
<B>ecn</B>
is turned off.
<P>
<A NAME="lbAK">&nbsp;</A>
<H3>ce_threshold</H3>
sets a threshold above which all packets are marked with ECN Congestion
Experienced. This is useful for DCTCP-style congestion control algorithms that
require marking at very shallow queueing thresholds.
<P>
<P>
<A NAME="lbAL">&nbsp;</A>
<H2>EXAMPLES</H2>
<BR>&nbsp;#&nbsp;tc&nbsp;qdisc&nbsp;add&nbsp;dev&nbsp;eth0&nbsp;root&nbsp;codel
<BR>&nbsp;#&nbsp;tc&nbsp;-s&nbsp;qdisc&nbsp;show
<BR>&nbsp;&nbsp;&nbsp;qdisc&nbsp;codel&nbsp;801b:&nbsp;dev&nbsp;eth0&nbsp;root&nbsp;refcnt&nbsp;2&nbsp;limit&nbsp;1000p&nbsp;target&nbsp;5.0ms
interval 100.0ms
<BR>&nbsp;&nbsp;&nbsp;&nbsp;Sent&nbsp;245801662&nbsp;bytes&nbsp;275853&nbsp;pkt&nbsp;(dropped&nbsp;0,&nbsp;overlimits&nbsp;0&nbsp;requeues&nbsp;24)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;backlog&nbsp;0b&nbsp;0p&nbsp;requeues&nbsp;24
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count&nbsp;0&nbsp;lastcount&nbsp;0&nbsp;ldelay&nbsp;2us&nbsp;drop_next&nbsp;0us
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxpacket&nbsp;7306&nbsp;ecn_mark&nbsp;0&nbsp;drop_overlimit&nbsp;0
<P>
<BR>&nbsp;#&nbsp;tc&nbsp;qdisc&nbsp;add&nbsp;dev&nbsp;eth0&nbsp;root&nbsp;codel&nbsp;limit&nbsp;100&nbsp;target&nbsp;4ms&nbsp;interval&nbsp;30ms&nbsp;ecn
<BR>&nbsp;#&nbsp;tc&nbsp;-s&nbsp;qdisc&nbsp;show
<BR>&nbsp;&nbsp;&nbsp;qdisc&nbsp;codel&nbsp;801c:&nbsp;dev&nbsp;eth0&nbsp;root&nbsp;refcnt&nbsp;2&nbsp;limit&nbsp;100p&nbsp;target&nbsp;4.0ms
interval 30.0ms ecn
<BR>&nbsp;&nbsp;&nbsp;&nbsp;Sent&nbsp;237573074&nbsp;bytes&nbsp;268561&nbsp;pkt&nbsp;(dropped&nbsp;0,&nbsp;overlimits&nbsp;0&nbsp;requeues&nbsp;5)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;backlog&nbsp;0b&nbsp;0p&nbsp;requeues&nbsp;5
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count&nbsp;0&nbsp;lastcount&nbsp;0&nbsp;ldelay&nbsp;76us&nbsp;drop_next&nbsp;0us
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxpacket&nbsp;2962&nbsp;ecn_mark&nbsp;0&nbsp;drop_overlimit&nbsp;0
<P>
<P>
<A NAME="lbAM">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?8+tc">tc</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+tc-red">tc-red</A></B>(8)
<P>
<A NAME="lbAN">&nbsp;</A>
<H2>SOURCES</H2>
o Kathleen Nichols and Van Jacobson, &quot;Controlling Queue Delay&quot;, ACM Queue,
<A HREF="http://queue.acm.org/detail.cfm?id=2209336">http://queue.acm.org/detail.cfm?id=2209336</A>
<P>
<A NAME="lbAO">&nbsp;</A>
<H2>AUTHORS</H2>
CoDel was implemented by Eric Dumazet and David Taht. This manpage was written
by Vijay Subramanian. Please reports corrections to the Linux Networking
mailing list &lt;<A HREF="mailto:netdev@vger.kernel.org">netdev@vger.kernel.org</A>&gt;.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">ALGORITHM</A><DD>
<DT id="5"><A HREF="#lbAF">PARAMETERS</A><DD>
<DL>
<DT id="6"><A HREF="#lbAG">limit</A><DD>
<DT id="7"><A HREF="#lbAH">target</A><DD>
<DT id="8"><A HREF="#lbAI">interval</A><DD>
<DT id="9"><A HREF="#lbAJ">ecn | noecn</A><DD>
<DT id="10"><A HREF="#lbAK">ce_threshold</A><DD>
</DL>
<DT id="11"><A HREF="#lbAL">EXAMPLES</A><DD>
<DT id="12"><A HREF="#lbAM">SEE ALSO</A><DD>
<DT id="13"><A HREF="#lbAN">SOURCES</A><DD>
<DT id="14"><A HREF="#lbAO">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:17 GMT, March 31, 2021
</BODY>
</HTML>