|
Packit Service |
3880ab |
.TH RED 8 "13 December 2001" "iproute2" "Linux"
|
|
Packit Service |
3880ab |
.SH NAME
|
|
Packit Service |
3880ab |
red \- Random Early Detection
|
|
Packit Service |
3880ab |
.SH SYNOPSIS
|
|
Packit Service |
3880ab |
.B tc qdisc ... red
|
|
Packit Service |
3880ab |
.B limit
|
|
Packit Service |
3880ab |
bytes
|
|
Packit Service |
3880ab |
.B [ min
|
|
Packit Service |
3880ab |
bytes
|
|
Packit Service |
3880ab |
.B ] [ max
|
|
Packit Service |
3880ab |
bytes
|
|
Packit Service |
3880ab |
.B ] avpkt
|
|
Packit Service |
3880ab |
bytes
|
|
Packit Service |
3880ab |
.B [ burst
|
|
Packit Service |
3880ab |
packets
|
|
Packit Service |
3880ab |
.B ] [ ecn ] [ harddrop ] [ nodrop ] [ bandwidth
|
|
Packit Service |
3880ab |
rate
|
|
Packit Service |
3880ab |
.B ] [ probability
|
|
Packit Service |
3880ab |
chance
|
|
Packit Service |
3880ab |
.B ] [ adaptive ] [ qevent early_drop block
|
|
Packit Service |
3880ab |
index
|
|
Packit Service |
3880ab |
.B ] [ qevent mark block
|
|
Packit Service |
3880ab |
index
|
|
Packit Service |
3880ab |
.B ]
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH DESCRIPTION
|
|
Packit Service |
3880ab |
Random Early Detection is a classless qdisc which manages its queue size
|
|
Packit Service |
3880ab |
smartly. Regular queues simply drop packets from the tail when they are
|
|
Packit Service |
3880ab |
full, which may not be the optimal behaviour. RED also performs tail drop,
|
|
Packit Service |
3880ab |
but does so in a more gradual way.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
Once the queue hits a certain average length, packets enqueued have a
|
|
Packit Service |
3880ab |
configurable chance of being marked (which may mean dropped). This chance
|
|
Packit Service |
3880ab |
increases linearly up to a point called the
|
|
Packit Service |
3880ab |
.B max
|
|
Packit Service |
3880ab |
average queue length, although the queue might get bigger.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
This has a host of benefits over simple taildrop, while not being processor
|
|
Packit Service |
3880ab |
intensive. It prevents synchronous retransmits after a burst in traffic,
|
|
Packit Service |
3880ab |
which cause further retransmits, etc.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
The goal is to have a small queue size, which is good for interactivity
|
|
Packit Service |
3880ab |
while not disturbing TCP/IP traffic with too many sudden drops after a burst
|
|
Packit Service |
3880ab |
of traffic.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
Depending on if ECN is configured, marking either means dropping or
|
|
Packit Service |
3880ab |
purely marking a packet as overlimit.
|
|
Packit Service |
3880ab |
.SH ALGORITHM
|
|
Packit Service |
3880ab |
The average queue size is used for determining the marking
|
|
Packit Service |
3880ab |
probability. This is calculated using an Exponential Weighted Moving
|
|
Packit Service |
3880ab |
Average, which can be more or less sensitive to bursts.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
When the average queue size is below
|
|
Packit Service |
3880ab |
.B min
|
|
Packit Service |
3880ab |
bytes, no packet will ever be marked. When it exceeds
|
|
Packit Service |
3880ab |
.B min,
|
|
Packit Service |
3880ab |
the probability of doing so climbs linearly up
|
|
Packit Service |
3880ab |
to
|
|
Packit Service |
3880ab |
.B probability,
|
|
Packit Service |
3880ab |
until the average queue size hits
|
|
Packit Service |
3880ab |
.B max
|
|
Packit Service |
3880ab |
bytes. Because
|
|
Packit Service |
3880ab |
.B probability
|
|
Packit Service |
3880ab |
is normally not set to 100%, the queue size might
|
|
Packit Service |
3880ab |
conceivably rise above
|
|
Packit Service |
3880ab |
.B max
|
|
Packit Service |
3880ab |
bytes, so the
|
|
Packit Service |
3880ab |
.B limit
|
|
Packit Service |
3880ab |
parameter is provided to set a hard maximum for the size of the queue.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH PARAMETERS
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
min
|
|
Packit Service |
3880ab |
Average queue size at which marking becomes a possibility. Defaults to
|
|
Packit Service |
3880ab |
.B max
|
|
Packit Service |
3880ab |
/3
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
max
|
|
Packit Service |
3880ab |
At this average queue size, the marking probability is maximal. Should be at
|
|
Packit Service |
3880ab |
least twice
|
|
Packit Service |
3880ab |
.B min
|
|
Packit Service |
3880ab |
to prevent synchronous retransmits, higher for low
|
|
Packit Service |
3880ab |
.B min.
|
|
Packit Service |
3880ab |
Default to
|
|
Packit Service |
3880ab |
.B limit
|
|
Packit Service |
3880ab |
/4
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
probability
|
|
Packit Service |
3880ab |
Maximum probability for marking, specified as a floating point
|
|
Packit Service |
3880ab |
number from 0.0 to 1.0. Suggested values are 0.01 or 0.02 (1 or 2%,
|
|
Packit Service |
3880ab |
respectively). Default : 0.02
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
limit
|
|
Packit Service |
3880ab |
Hard limit on the real (not average) queue size in bytes. Further packets
|
|
Packit Service |
3880ab |
are dropped. Should be set higher than max+burst. It is advised to set this
|
|
Packit Service |
3880ab |
a few times higher than
|
|
Packit Service |
3880ab |
.B max.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
burst
|
|
Packit Service |
3880ab |
Used for determining how fast the average queue size is influenced by the
|
|
Packit Service |
3880ab |
real queue size. Larger values make the calculation more sluggish, allowing
|
|
Packit Service |
3880ab |
longer bursts of traffic before marking starts. Real life experiments
|
|
Packit Service |
3880ab |
support the following guideline: (min+min+max)/(3*avpkt).
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
avpkt
|
|
Packit Service |
3880ab |
Specified in bytes. Used with burst to determine the time constant for
|
|
Packit Service |
3880ab |
average queue size calculations. 1000 is a good value.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
bandwidth
|
|
Packit Service |
3880ab |
This rate is used for calculating the average queue size after some
|
|
Packit Service |
3880ab |
idle time. Should be set to the bandwidth of your interface. Does not mean
|
|
Packit Service |
3880ab |
that RED will shape for you! Optional. Default : 10Mbit
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
ecn
|
|
Packit Service |
3880ab |
As mentioned before, RED can either 'mark' or 'drop'. Explicit Congestion
|
|
Packit Service |
3880ab |
Notification allows RED to notify remote hosts that their rate exceeds the
|
|
Packit Service |
3880ab |
amount of bandwidth available. Non-ECN capable hosts can only be notified by
|
|
Packit Service |
3880ab |
dropping a packet. If this parameter is specified, packets which indicate
|
|
Packit Service |
3880ab |
that their hosts honor ECN will only be marked and not dropped, unless the
|
|
Packit Service |
3880ab |
queue size hits
|
|
Packit Service |
3880ab |
.B limit
|
|
Packit Service |
3880ab |
bytes. Recommended.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
harddrop
|
|
Packit Service |
3880ab |
If average flow queue size is above
|
|
Packit Service |
3880ab |
.B max
|
|
Packit Service |
3880ab |
bytes, this parameter forces a drop instead of ecn marking.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
nodrop
|
|
Packit Service |
3880ab |
With this parameter, traffic that should be marked, but is not ECN-capable, is
|
|
Packit Service |
3880ab |
enqueued. Without the parameter it is early-dropped.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
adaptive
|
|
Packit Service |
3880ab |
(Added in linux-3.3) Sets RED in adaptive mode as described in http://icir.org/floyd/papers/adaptiveRed.pdf
|
|
Packit Service |
3880ab |
.nf
|
|
Packit Service |
3880ab |
Goal of Adaptive RED is to make 'probability' dynamic value between 1% and 50% to reach the target average queue :
|
|
Packit Service |
3880ab |
.B (max - min) / 2
|
|
Packit Service |
3880ab |
.fi
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH QEVENTS
|
|
Packit Service |
3880ab |
See tc (8) for some general notes about qevents. The RED qdisc supports the
|
|
Packit Service |
3880ab |
following qevents:
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
early_drop
|
|
Packit Service |
3880ab |
The associated block is executed when packets are early-dropped. This includes
|
|
Packit Service |
3880ab |
non-ECT packets in ECN mode.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
mark
|
|
Packit Service |
3880ab |
The associated block is executed when packets are marked in ECN mode.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH EXAMPLE
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.P
|
|
Packit Service |
3880ab |
# tc qdisc add dev eth0 parent 1:1 handle 10: red
|
|
Packit Service |
3880ab |
limit 400000 min 30000 max 90000 avpkt 1000
|
|
Packit Service |
3880ab |
burst 55 ecn adaptive bandwidth 10Mbit
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH SEE ALSO
|
|
Packit Service |
3880ab |
.BR tc (8),
|
|
Packit Service |
3880ab |
.BR tc-choke (8)
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH SOURCES
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
o
|
|
Packit Service |
3880ab |
Floyd, S., and Jacobson, V., Random Early Detection gateways for
|
|
Packit Service |
3880ab |
Congestion Avoidance. http://www.aciri.org/floyd/papers/red/red.html
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
o
|
|
Packit Service |
3880ab |
Some changes to the algorithm by Alexey N. Kuznetsov.
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
o
|
|
Packit Service |
3880ab |
Adaptive RED : http://icir.org/floyd/papers/adaptiveRed.pdf
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH AUTHORS
|
|
Packit Service |
3880ab |
Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru>, Alexey Makarenko
|
|
Packit Service |
3880ab |
<makar@phoenix.kharkov.ua>, J Hadi Salim <hadi@nortelnetworks.com>,
|
|
Packit Service |
3880ab |
Eric Dumazet <eric.dumazet@gmail.com>.
|
|
Packit Service |
3880ab |
This manpage maintained by bert hubert <ahu@ds9a.nl>
|