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 ] [ nodrop ] [ bandwidth  rate  ]  [
11       probability  chance  ] [ adaptive ] [ qevent early_drop block index ] [
12       qevent mark block index ]
13
14

DESCRIPTION

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

ALGORITHM

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

PARAMETERS

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

QEVENTS

107       See tc (8) for some general notes about qevents. The RED qdisc supports
108       the following qevents:
109
110
111       early_drop
112              The associated block is executed when packets are early-dropped.
113              This includes non-ECT packets in ECN mode.
114
115       mark   The  associated block is executed when packets are marked in ECN
116              mode.
117
118

EXAMPLE

120       # tc qdisc add dev eth0 parent 1:1 handle 10: red
121        limit 400000 min 30000 max 90000 avpkt 1000
122        burst 55 ecn adaptive bandwidth 10Mbit
123
124

SEE ALSO

126       tc(8), tc-choke(8)
127
128

SOURCES

130       o      Floyd, S., and Jacobson, V., Random Early Detection gateways for
131              Congestion                                            Avoidance.
132              http://www.aciri.org/floyd/papers/red/red.html
133
134       o      Some changes to the algorithm by Alexey N. Kuznetsov.
135
136       o      Adaptive RED  : http://icir.org/floyd/papers/adaptiveRed.pdf
137
138

AUTHORS

140       Alexey  N.   Kuznetsov,   <kuznet@ms2.inr.ac.ru>,    Alexey   Makarenko
141       <makar@phoenix.kharkov.ua>,  J  Hadi  Salim  <hadi@nortelnetworks.com>,
142       Eric Dumazet <eric.dumazet@gmail.com>.  This manpage maintained by bert
143       hubert <ahu@ds9a.nl>
144
145
146
147iproute2                       13 December 2001                         RED(8)
Impressum