282 lines
8.7 KiB
HTML
282 lines
8.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SFB</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SFB</H1>
|
|
Section: Linux (8)<BR>Updated: August 2011<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
sfb - Stochastic Fair Blue
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>tc qdisc ... blue</B>
|
|
|
|
<B>rehash</B>
|
|
|
|
milliseconds
|
|
<B>db</B>
|
|
|
|
milliseconds
|
|
<B>limit</B>
|
|
|
|
packets
|
|
<B>max</B>
|
|
|
|
packets
|
|
<B>target</B>
|
|
|
|
packets
|
|
<B>increment</B>
|
|
|
|
float
|
|
<B>decrement</B>
|
|
|
|
float
|
|
<B>penalty_rate</B>
|
|
|
|
packets per second
|
|
<B>penalty_burst</B>
|
|
|
|
packets
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Stochastic Fair Blue is a classless qdisc to manage congestion based on
|
|
packet loss and link utilization history while trying to prevent
|
|
non-responsive flows (i.e. flows that do not react to congestion marking
|
|
or dropped packets) from impacting performance of responsive flows.
|
|
Unlike RED, where the marking probability has to be configured, BLUE
|
|
tries to determine the ideal marking probability automatically.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>ALGORITHM</H2>
|
|
|
|
<P>
|
|
The
|
|
<B>BLUE</B>
|
|
|
|
algorithm maintains a probability which is used to mark or drop packets
|
|
that are to be queued. If the queue overflows, the mark/drop probability
|
|
is increased. If the queue becomes empty, the probability is decreased. The
|
|
<B>Stochastic Fair Blue</B>
|
|
|
|
(SFB) algorithm is designed to protect TCP flows against non-responsive flows.
|
|
<P>
|
|
This SFB implementation maintains 8 levels of 16 bins each for accounting.
|
|
Each flow is mapped into a bin of each level using a per-level hash value.
|
|
<P>
|
|
Every bin maintains a marking probability, which gets increased or decreased
|
|
based on bin occupancy. If the number of packets exceeds the size of that
|
|
bin, the marking probability is increased. If the number drops to zero, it
|
|
is decreased.
|
|
<P>
|
|
The marking probability is based on the minimum value of all bins a flow is
|
|
mapped into, thus, when a flow does not respond to marking or gradual packet
|
|
drops, the marking probability quickly reaches one.
|
|
<P>
|
|
In this case, the flow is rate-limited to
|
|
<B>penalty_rate</B>
|
|
|
|
packets per second.
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>LIMITATIONS</H2>
|
|
|
|
<P>
|
|
Due to SFBs nature, it is possible for responsive flows to share all of its bins
|
|
with a non-responsive flow, causing the responsive flow to be misidentified as
|
|
being non-responsive.
|
|
<P>
|
|
The probability of a responsive flow to be misidentified is dependent on
|
|
the number of non-responsive flows, M. It is (1 - (1 - (1 / 16.0)) ** M) **8,
|
|
so for example with 10 non-responsive flows approximately 0.2% of responsive flows
|
|
will be misidentified.
|
|
<P>
|
|
To mitigate this, SFB performs performs periodic re-hashing to avoid
|
|
misclassification for prolonged periods of time.
|
|
<P>
|
|
The default hashing method will use source and destination ip addresses and port numbers
|
|
if possible, and also supports tunneling protocols.
|
|
Alternatively, an external classifier can be configured, too.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>PARAMETERS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">rehash<DD>
|
|
Time interval in milliseconds when queue perturbation occurs to avoid erroneously
|
|
detecting unrelated, responsive flows as being part of a non-responsive flow for
|
|
prolonged periods of time.
|
|
Defaults to 10 minutes.
|
|
<DT id="2">db<DD>
|
|
Double buffering warmup wait time, in milliseconds.
|
|
To avoid destroying the probability history when rehashing is performed, this
|
|
implementation maintains a second set of levels/bins as described in section
|
|
4.4 of the SFB reference.
|
|
While one set is used to manage the queue, a second set is warmed up:
|
|
Whenever a flow is then determined to be non-responsive, the marking
|
|
probabilities in the second set are updated. When the rehashing
|
|
happens, these bins will be used to manage the queue and all non-responsive
|
|
flows can be rate-limited immediately.
|
|
This value determines how much time has to pass before the 2nd set
|
|
will start to be warmed up.
|
|
Defaults to one minute, should be lower than
|
|
<B>rehash.</B>
|
|
|
|
<DT id="3">limit<DD>
|
|
Hard limit on the real (not average) total queue size in packets.
|
|
Further packets are dropped. Defaults to the transmit queue length of the
|
|
device the qdisc is attached to.
|
|
<DT id="4">max<DD>
|
|
Maximum length of a buckets queue, in packets, before packets start being
|
|
dropped. Should be sightly larger than
|
|
<B>target</B>
|
|
|
|
, but should not be set to values exceeding 1.5 times that of
|
|
<B>target .</B>
|
|
|
|
Defaults to 25.
|
|
<DT id="5">target<DD>
|
|
The desired average bin length. If the bin queue length reaches this value,
|
|
the marking probability is increased by
|
|
<B>increment.</B>
|
|
|
|
The default value depends on the
|
|
<B>max</B>
|
|
|
|
setting, with max set to 25
|
|
<B>target</B>
|
|
|
|
will default to 20.
|
|
<DT id="6">increment<DD>
|
|
A value used to increase the marking probability when the queue appears
|
|
to be over-used. Must be between 0 and 1.0. Defaults to 0.00050.
|
|
<DT id="7">decrement<DD>
|
|
Value used to decrease the marking probability when the queue is found
|
|
to be empty. Must be between 0 and 1.0.
|
|
Defaults to 0.00005.
|
|
<DT id="8">penalty_rate<DD>
|
|
The maximum number of packets belonging to flows identified as being
|
|
non-responsive that can be enqueued per second. Once this number has been
|
|
reached, further packets of such non-responsive flows are dropped.
|
|
Set this to a reasonable fraction of your uplink throughput; the
|
|
default value of 10 packets is probably too small.
|
|
<DT id="9">penalty_burst<DD>
|
|
The number of packets a flow is permitted to exceed the penalty rate before packets
|
|
start being dropped.
|
|
Defaults to 20 packets.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>STATISTICS</H2>
|
|
|
|
<P>
|
|
This qdisc exposes additional statistics via 'tc -s qdisc' output.
|
|
These are:
|
|
<DL COMPACT>
|
|
<DT id="10">earlydrop<DD>
|
|
The number of packets dropped before a per-flow queue was full.
|
|
<DT id="11">ratedrop<DD>
|
|
The number of packets dropped because of rate-limiting.
|
|
If this value is high, there are many non-reactive flows being
|
|
sent through sfb. In such cases, it might be better to
|
|
embed sfb within a classful qdisc to better control such
|
|
flows using a different, shaping qdisc.
|
|
<DT id="12">bucketdrop<DD>
|
|
The number of packets dropped because a per-flow queue was full.
|
|
High bucketdrop may point to a high number of aggressive, short-lived
|
|
flows.
|
|
<DT id="13">queuedrop<DD>
|
|
The number of packets dropped due to reaching limit. This should normally be 0.
|
|
<DT id="14">marked<DD>
|
|
The number of packets marked with ECN.
|
|
<DT id="15">maxqlen<DD>
|
|
The length of the current longest per-flow (virtual) queue.
|
|
<DT id="16">maxprob<DD>
|
|
The maximum per-flow drop probability. 1 means that some
|
|
flows have been detected as non-reactive.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<P>
|
|
SFB automatically enables use of Explicit Congestion Notification (ECN).
|
|
Also, this SFB implementation does not queue packets itself.
|
|
Rather, packets are enqueued to the inner qdisc (defaults to pfifo).
|
|
Because sfb maintains virtual queue states, the inner qdisc must not
|
|
drop a packet previously queued.
|
|
Furthermore, if a buckets queue has a very high marking rate,
|
|
this implementation will start dropping packets instead of
|
|
marking them, as such a situation points to either bad congestion, or an
|
|
unresponsive flow.
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>EXAMPLE & USAGE</H2>
|
|
|
|
<P>
|
|
To attach to interface $DEV, using default options:
|
|
<P>
|
|
|
|
# tc qdisc add dev $DEV handle 1: root sfb
|
|
<P>
|
|
Only use destination ip addresses for assigning packets to bins, perturbing
|
|
hash results every 10 minutes:
|
|
<P>
|
|
|
|
# tc filter add dev $DEV parent 1: handle 1 flow hash keys dst perturb 600
|
|
<P>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc">tc</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc-red">tc-red</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc-sfq">tc-sfq</A></B>(8)
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H2>SOURCES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="17">o<DD>
|
|
W. Feng, D. Kandlur, D. Saha, K. Shin, BLUE: A New Class of Active Queue Management Algorithms,
|
|
U. Michigan CSE-TR-387-99, April 1999.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAM"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
<P>
|
|
This SFB implementation was contributed by Juliusz Chroboczek and Eric Dumazet.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="18"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="19"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="20"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="21"><A HREF="#lbAE">ALGORITHM</A><DD>
|
|
<DT id="22"><A HREF="#lbAF">LIMITATIONS</A><DD>
|
|
<DT id="23"><A HREF="#lbAG">PARAMETERS</A><DD>
|
|
<DT id="24"><A HREF="#lbAH">STATISTICS</A><DD>
|
|
<DT id="25"><A HREF="#lbAI">NOTES</A><DD>
|
|
<DT id="26"><A HREF="#lbAJ">EXAMPLE & USAGE</A><DD>
|
|
<DT id="27"><A HREF="#lbAK">SEE ALSO</A><DD>
|
|
<DT id="28"><A HREF="#lbAL">SOURCES</A><DD>
|
|
<DT id="29"><A HREF="#lbAM">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:17 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|