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 schedules the transmission of packets, based on 'flows'.
18 The goal 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.
23 SFQ is work-conserving and therefore always delivers a packet if it has one available.
25 On enqueueing, each packet is assigned to a hash bucket, based on
36 If these are available. SFQ knows about ipv4 and ipv6 and also UDP, TCP and ESP.
37 Packets with other protocols are hashed based on the 32bits representation of their
38 destination and the socket they belong to. A flow corresponds mostly to a TCP/IP
41 Each of these buckets should represent a unique flow. Because multiple flows may
42 get hashed to the same bucket, the hashing algorithm is perturbed at configurable
43 intervals so that the unfairness lasts only for a short while. Perturbation may
44 however cause some inadvertent packet reordering to occur.
46 When dequeuing, each hashbucket with data is queried in a round robin fashion.
48 The compile time maximum length of the SFQ is 128 packets, which can be spread over
49 at most 128 buckets of 1024 available. In case of overflow, tail-drop is performed
50 on the fullest bucket, thus maintaining fairness.
55 Interval in seconds for queue algorithm perturbation. Defaults to 0, which means that
56 no perturbation occurs. Do not set too low for each perturbation may cause some packet
57 reordering. Advised value: 10
60 Amount of bytes a flow is allowed to dequeue during a round of the round robin process.
61 Defaults to the MTU of the interface which is also the advised value and the minimum value.
65 To attach to device ppp0:
67 # tc qdisc add dev ppp0 root sfq perturb 10
69 Please note that SFQ, like all non-shaping (work-conserving) qdiscs, is only useful
71 This is the case when the link speed equals the actually available bandwidth. This holds
72 for regular phone modems, ISDN connections and direct non-switched ethernet links.
74 Most often, cable modems and DSL devices do not fall into this category. The same holds
75 for when connected to a switch and trying to send data to a congested segment also
76 connected to the switch.
78 In this case, the effective queue does not reside within Linux and is therefore not
79 available for scheduling.
81 Embed SFQ in a classful qdisc to make sure it owns the queue.
86 Paul E. McKenney "Stochastic Fairness Queuing",
87 IEEE INFOCOMM'90 Proceedings, San Francisco, 1990.
91 Paul E. McKenney "Stochastic Fairness Queuing",
92 "Interworking: Research and Experience", v.2, 1991, p.113-131.
97 M. Shreedhar and George Varghese "Efficient Fair
98 Queuing using Deficit Round Robin", Proc. SIGCOMM 95.
104 Alexey N. Kuznetsov, <kuznet@ms2.inr.ac.ru>. This manpage maintained by
105 bert hubert <ahu@ds9a.nl>