1RED(8)                               Linux                              RED(8)
2
3
4

NAME

6       red - Random Early Detection
7

SYNOPSIS

9       tc  qdisc ... red limit bytes [ min bytes ] [ max bytes ] avpkt bytes [
10       burst packets ] [ ecn ] [ harddrop] [ bandwidth rate  ]  [  probability
11       chance ] [ adaptive ]
12
13

DESCRIPTION

15       Random  Early  Detection  is  a classless qdisc which manages its queue
16       size smartly. Regular queues simply drop packets  from  the  tail  when
17       they  are  full,  which may not be the optimal behaviour. RED also per‐
18       forms tail drop, but does so in a more gradual way.
19
20       Once the queue hits a certain average length, packets enqueued  have  a
21       configurable  chance  of  being  marked  (which may mean dropped). This
22       chance increases linearly up to a point called the  max  average  queue
23       length, although the queue might get bigger.
24
25       This  has a host of benefits over simple taildrop, while not being pro‐
26       cessor intensive. It prevents synchronous retransmits after a burst  in
27       traffic, which cause further retransmits, etc.
28
29       The goal is to have a small queue size, which is good for interactivity
30       while not disturbing TCP/IP traffic with too many sudden drops after  a
31       burst of traffic.
32
33       Depending  on  if  ECN  is configured, marking either means dropping or
34       purely marking a packet as overlimit.
35

ALGORITHM

37       The average queue size is used for determining the marking probability.
38       This  is calculated using an Exponential Weighted Moving Average, which
39       can be more or less sensitive to bursts.
40
41       When the average queue size is below min bytes, no packet will ever  be
42       marked.  When  it  exceeds min, the probability of doing so climbs lin‐
43       early up to probability, until the average queue size hits  max  bytes.
44       Because  probability  is normally not set to 100%, the queue size might
45       conceivably rise above max bytes, so the limit parameter is provided to
46       set a hard maximum for the size of the queue.
47
48

PARAMETERS

50       min    Average  queue  size  at  which  marking  becomes a possibility.
51              Defaults to max /3
52
53
54       max    At this average queue size, the marking probability is  maximal.
55              Should be at least twice min to prevent synchronous retransmits,
56              higher for low min.  Default to limit /4
57
58       probability
59              Maximum probability for marking, specified as a  floating  point
60              number  from 0.0 to 1.0. Suggested values are 0.01 or 0.02 (1 or
61              2%, respectively). Default : 0.02
62
63       limit  Hard limit on the real (not average) queue size in  bytes.  Fur‐
64              ther  packets  are dropped. Should be set higher than max+burst.
65              It is advised to set this a few times higher than max.
66
67       burst  Used for determining how fast the average queue size  is  influ‐
68              enced by the real queue size. Larger values make the calculation
69              more sluggish, allowing longer bursts of traffic before  marking
70              starts.  Real  life experiments support the following guideline:
71              (min+min+max)/(3*avpkt).
72
73       avpkt  Specified in bytes. Used with burst to determine the  time  con‐
74              stant for average queue size calculations. 1000 is a good value.
75
76       bandwidth
77              This  rate  is used for calculating the average queue size after
78              some idle time. Should be set to the bandwidth  of  your  inter‐
79              face.  Does  not  mean  that  RED  will shape for you! Optional.
80              Default : 10Mbit
81
82       ecn    As mentioned before, RED can either 'mark' or  'drop'.  Explicit
83              Congestion  Notification  allows RED to notify remote hosts that
84              their rate exceeds the amount of  bandwidth  available.  Non-ECN
85              capable hosts can only be notified by dropping a packet. If this
86              parameter is specified, packets which indicate that their  hosts
87              honor  ECN will only be marked and not dropped, unless the queue
88              size hits limit bytes. Recommended.
89
90       harddrop
91              If average flow queue size is above max  bytes,  this  parameter
92              forces a drop instead of ecn marking.
93
94       adaptive
95              (Added  in  linux-3.3) Sets RED in adaptive mode as described in
96              http://icir.org/floyd/papers/adaptiveRed.pdf
97              Goal of Adaptive RED is to make 'probability' dynamic value between 1% and 50% to reach the target average queue :
98              (max - min) / 2
99
100

EXAMPLE

102       # tc qdisc add dev eth0 parent 1:1 handle 10: red
103        limit 400000 min 30000 max 90000 avpkt 1000
104        burst 55 ecn adaptive bandwidth 10Mbit
105
106

SEE ALSO

108       tc(8), tc-choke(8)
109
110

SOURCES

112       o      Floyd, S., and Jacobson, V., Random Early Detection gateways for
113              Congestion                                            Avoidance.
114              http://www.aciri.org/floyd/papers/red/red.html
115
116       o      Some changes to the algorithm by Alexey N. Kuznetsov.
117
118       o      Adaptive RED  : http://icir.org/floyd/papers/adaptiveRed.pdf
119
120

AUTHORS

122       Alexey  N.   Kuznetsov,   <kuznet@ms2.inr.ac.ru>,    Alexey   Makarenko
123       <makar@phoenix.kharkov.ua>,  J  Hadi  Salim  <hadi@nortelnetworks.com>,
124       Eric Dumazet <eric.dumazet@gmail.com>.  This manpage maintained by bert
125       hubert <ahu@ds9a.nl>
126
127
128
129iproute2                       13 December 2001                         RED(8)
Impressum