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