1 .TH TC 8 "8 December 2001" "iproute2" "Linux"
3 sfq \- Stochastic Fairness Queueing
5 .B tc qdisc ... perturb
12 Stochastic Fairness Queueing is a classless queueing discipline available for
13 traffic control with the
17 SFQ does not shape traffic but only reorders packets, based on 'flows'. The goal
18 is to ensure fairness so that each flow is able to send data in turn, thus preventing
19 any single flow from drowning out the rest.
21 This may in fact have some effect in mitigating a Denial of Service attempt.
24 On enqueueing, each packet is assigned to a hash bucket, based on
35 If these are available. SFQ knows about ipv4 and ipv6 and also UDP, TCP and ESP.
36 Packets with other protocols are hashed based on the 32bits representation of their
37 destination and the socket they belong to. A flow corresponds mostly to a TCP/IP
40 Each of these buckets should represent a unique flow. Because multiple flows may
41 get hashed to the same bucket, the hashing algorithm is perturbed at configurable
42 intervals so that the unfairness lasts only for a short while. Perturbation may
43 however cause some inadvertent packet reordering to occur.
45 When dequeueing, each hasbucket with data is queried in a round robin fashion.
47 The compile time maximum length of the SFQ is 128 packets, which can be spread over
48 at most 128 buckets of 1024 available. In case of overflow, tail-drop is performed
49 on the fullest bucket, thus maintaining fairness.
54 Interval in seconds for queue algorithm perturbation. Defaults to 0, which means that
55 no perturbation occurs. Do not set too low for each perturbation may cause some packet
56 reordering. Advised value: 10
59 Amount of bytes a flow is allowed to dequeue during a round of the round robin process.
60 Defaults to the MTU of the interface which is also the advised value and the minimum value.
64 To attach to device ppp0:
66 # tc qdisc add dev ppp0 root sfq perturb 10
68 Please note that SFQ, like all non-shaping SFQs, is only useful if it owns the queue.
69 This is the case when the link speed equals the actually available bandwidth. This holds
70 for regular phone modems, ISDN connections and direct non-switched ethernet links.
72 Most often, cablemodems and DSL devices do not fall into this category. The same holds
73 for when connected to a switch and trying to send data to a congested segment also
74 connected to the switch.
76 In this case, the effective queue does not reside within Linux and is therefore not
77 available for reordering.
79 Embed SFQ in a classful qdisc to make sure it owns the queue.
84 Paul E. McKenney "Stochastic Fairness Queuing",
85 IEEE INFOCOMM'90 Proceedings, San Francisco, 1990.
89 Paul E. McKenney "Stochastic Fairness Queuing",
90 "Interworking: Research and Experience", v.2, 1991, p.113-131.
95 M. Shreedhar and George Varghese "Efficient Fair
96 Queuing using Deficit Round Robin", Proc. SIGCOMM 95.
102 Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru>. This manpage maintained by
103 bert hubert <ahu@ds9a.nl>