1RED(8) Linux RED(8)
2
3
4
6 red - Random Early Detection
7
9 tc qdisc ... red limit bytes min bytes max bytes avpkt bytes burst
10 packets [ ecn ] [ bandwidth rate ] probability chance
11
12
14 Random Early Detection is a classless qdisc which manages its queue
15 size smartly. Regular queues simply drop packets from the tail when
16 they are full, which may not be the optimal behaviour. RED also per‐
17 forms tail drop, but does so in a more gradual way.
18
19 Once the queue hits a certain average length, packets enqueued have a
20 configurable chance of being marked (which may mean dropped). This
21 chance increases linearly up to a point called the max average queue
22 length, although the queue might get bigger.
23
24 This has a host of benefits over simple taildrop, while not being pro‐
25 cessor intensive. It prevents synchronous retransmits after a burst in
26 traffic, which cause further retransmits, etc.
27
28 The goal is the have a small queue size, which is good for interactiv‐
29 ity while not disturbing TCP/IP traffic with too many sudden drops
30 after a burst of traffic.
31
32 Depending on if ECN is configured, marking either means dropping or
33 purely marking a packet as overlimit.
34
36 The average queue size is used for determining the marking probability.
37 This is calculated using an Exponential Weighted Moving Average, which
38 can be more or less sensitive to bursts.
39
40 When the average queue size is below min bytes, no packet will ever be
41 marked. When it exceeds min, the probability of doing so climbs lin‐
42 early up to probability, until the average queue size hits max bytes.
43 Because probability is normally not set to 100%, the queue size might
44 conceivably rise above max bytes, so the limit parameter is provided to
45 set a hard maximum for the size of the queue.
46
47
49 min Average queue size at which marking becomes a possibility.
50
51 max At this average queue size, the marking probability is maximal.
52 Should be at least twice min to prevent synchronous retransmits,
53 higher for low min.
54
55 probability
56 Maximum probability for marking, specified as a floating point
57 number from 0.0 to 1.0. Suggested values are 0.01 or 0.02 (1 or
58 2%, respectively).
59
60 limit Hard limit on the real (not average) queue size in bytes. Fur‐
61 ther packets are dropped. Should be set higher than max+burst.
62 It is advised to set this a few times higher than max.
63
64 burst Used for determining how fast the average queue size is influ‐
65 enced by the real queue size. Larger values make the calculation
66 more sluggish, allowing longer bursts of traffic before marking
67 starts. Real life experiments support the following guideline:
68 (min+min+max)/(3*avpkt).
69
70 avpkt Specified in bytes. Used with burst to determine the time con‐
71 stant for average queue size calculations. 1000 is a good value.
72
73 bandwidth
74 This rate is used for calculating the average queue size after
75 some idle time. Should be set to the bandwidth of your inter‐
76 face. Does not mean that RED will shape for you! Optional.
77
78 ecn As mentioned before, RED can either 'mark' or 'drop'. Explicit
79 Congestion Notification allows RED to notify remote hosts that
80 their rate exceeds the amount of bandwidth available. Non-ECN
81 capable hosts can only be notified by dropping a packet. If
82 this parameter is specified, packets which indicate that their
83 hosts honor ECN will only be marked and not dropped, unless the
84 queue size hits limit bytes. Needs a tc binary with RED support
85 compiled in. Recommended.
86
87
89 tc(8)
90
91
93 o Floyd, S., and Jacobson, V., Random Early Detection gateways for
94 Congestion Avoidance.
95 http://www.aciri.org/floyd/papers/red/red.html
96
97 o Some changes to the algorithm by Alexey N. Kuznetsov.
98
99
101 Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru>, Alexey Makarenko
102 <makar@phoenix.kharkov.ua>, J Hadi Salim <hadi@nortelnetworks.com>.
103 This manpage maintained by bert hubert <ahu@ds9a.nl>
104
105
106
107
108
109iproute2 13 December 2001 RED(8)