blob: f410d157e613e620cb786d806573878249e4f243 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001.TH RED 8 "13 December 2001" "iproute2" "Linux"
2.SH NAME
3red \- Random Early Detection
4.SH SYNOPSIS
5.B tc qdisc ... red
6.B limit
7bytes
8.B [ min
9bytes
10.B ] [ max
11bytes
12.B ] avpkt
13bytes
14.B [ burst
15packets
16.B ] [ ecn ] [ harddrop] [ bandwidth
17rate
18.B ] [ probability
19chance
20.B ] [ adaptive ]
21
22.SH DESCRIPTION
23Random Early Detection is a classless qdisc which manages its queue size
24smartly. Regular queues simply drop packets from the tail when they are
25full, which may not be the optimal behaviour. RED also performs tail drop,
26but does so in a more gradual way.
27
28Once the queue hits a certain average length, packets enqueued have a
29configurable chance of being marked (which may mean dropped). This chance
30increases linearly up to a point called the
31.B max
32average queue length, although the queue might get bigger.
33
34This has a host of benefits over simple taildrop, while not being processor
35intensive. It prevents synchronous retransmits after a burst in traffic,
36which cause further retransmits, etc.
37
38The goal is to have a small queue size, which is good for interactivity
39while not disturbing TCP/IP traffic with too many sudden drops after a burst
40of traffic.
41
42Depending on if ECN is configured, marking either means dropping or
43purely marking a packet as overlimit.
44.SH ALGORITHM
45The average queue size is used for determining the marking
46probability. This is calculated using an Exponential Weighted Moving
47Average, which can be more or less sensitive to bursts.
48
49When the average queue size is below
50.B min
51bytes, no packet will ever be marked. When it exceeds
52.B min,
53the probability of doing so climbs linearly up
54to
55.B probability,
56until the average queue size hits
57.B max
58bytes. Because
59.B probability
60is normally not set to 100%, the queue size might
61conceivably rise above
62.B max
63bytes, so the
64.B limit
65parameter is provided to set a hard maximum for the size of the queue.
66
67.SH PARAMETERS
68.TP
69min
70Average queue size at which marking becomes a possibility. Defaults to
71.B max
72/3
73
74.TP
75max
76At this average queue size, the marking probability is maximal. Should be at
77least twice
78.B min
79to prevent synchronous retransmits, higher for low
80.B min.
81Default to
82.B limit
83/4
84.TP
85probability
86Maximum probability for marking, specified as a floating point
87number from 0.0 to 1.0. Suggested values are 0.01 or 0.02 (1 or 2%,
88respectively). Default : 0.02
89.TP
90limit
91Hard limit on the real (not average) queue size in bytes. Further packets
92are dropped. Should be set higher than max+burst. It is advised to set this
93a few times higher than
94.B max.
95.TP
96burst
97Used for determining how fast the average queue size is influenced by the
98real queue size. Larger values make the calculation more sluggish, allowing
99longer bursts of traffic before marking starts. Real life experiments
100support the following guideline: (min+min+max)/(3*avpkt).
101.TP
102avpkt
103Specified in bytes. Used with burst to determine the time constant for
104average queue size calculations. 1000 is a good value.
105.TP
106bandwidth
107This rate is used for calculating the average queue size after some
108idle time. Should be set to the bandwidth of your interface. Does not mean
109that RED will shape for you! Optional. Default : 10Mbit
110.TP
111ecn
112As mentioned before, RED can either 'mark' or 'drop'. Explicit Congestion
113Notification allows RED to notify remote hosts that their rate exceeds the
114amount of bandwidth available. Non-ECN capable hosts can only be notified by
115dropping a packet. If this parameter is specified, packets which indicate
116that their hosts honor ECN will only be marked and not dropped, unless the
117queue size hits
118.B limit
119bytes. Recommended.
120.TP
121harddrop
122If average flow queue size is above
123.B max
124bytes, this parameter forces a drop instead of ecn marking.
125.TP
126adaptive
127(Added in linux-3.3) Sets RED in adaptive mode as described in http://icir.org/floyd/papers/adaptiveRed.pdf
128.nf
129Goal of Adaptive RED is to make 'probability' dynamic value between 1% and 50% to reach the target average queue :
130.B (max - min) / 2
131.fi
132
133.SH EXAMPLE
134
135.P
136# tc qdisc add dev eth0 parent 1:1 handle 10: red
137 limit 400000 min 30000 max 90000 avpkt 1000
138 burst 55 ecn adaptive bandwidth 10Mbit
139
140.SH SEE ALSO
141.BR tc (8),
142.BR tc-choke (8)
143
144.SH SOURCES
145.TP
146o
147Floyd, S., and Jacobson, V., Random Early Detection gateways for
148Congestion Avoidance. http://www.aciri.org/floyd/papers/red/red.html
149.TP
150o
151Some changes to the algorithm by Alexey N. Kuznetsov.
152.TP
153o
154Adaptive RED : http://icir.org/floyd/papers/adaptiveRed.pdf
155
156.SH AUTHORS
157Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru>, Alexey Makarenko
158<makar@phoenix.kharkov.ua>, J Hadi Salim <hadi@nortelnetworks.com>,
159Eric Dumazet <eric.dumazet@gmail.com>.
160This manpage maintained by bert hubert <ahu@ds9a.nl>
161
162