1FQ(8)                                Linux                               FQ(8)
2
3
4

NAME

6       FQ - Fair Queue traffic policing
7

SYNOPSIS

9       tc  qdisc  ...  fq  [  limit PACKETS ] [ flow_limit PACKETS ] [ quantum
10       BYTES ] [ initial_quantum BYTES ] [ maxrate RATE ] [ buckets NUMBER ] [
11       orphan_mask NUMBER ] [ pacing | nopacing ] [ ce_threshold TIME ]
12
13

DESCRIPTION

15       FQ (Fair Queue) is a classless packet scheduler meant to be mostly used
16       for locally generated traffic.  It is designed to achieve per flow pac‐
17       ing.   FQ  does flow separation, and is able to respect pacing require‐
18       ments set by TCP stack.  All packets belonging to a socket are  consid‐
19       ered as a 'flow'.  For non local packets (router workload), packet hash
20       is used as fallback.
21
22       An application can specify a maximum pacing rate using the  SO_MAX_PAC‐
23       ING_RATE  setsockopt  call.   This  packet scheduler adds delay between
24       packets to respect rate limitation set on each socket. Note that  after
25       linux-4.20,  linux  adopted  EDT  (Earliest  Departure  Time)  and  TCP
26       directly sets the appropriate Departure Time for each skb.
27
28       Dequeueing happens in a round-robin fashion.  A special FIFO  queue  is
29       reserved  for  high  priority packets ( TC_PRIO_CONTROL priority), such
30       packets are always dequeued first.
31
32       FQ is non-work-conserving.
33
34       TCP pacing is good for flows having idle times, as the congestion  win‐
35       dow  permits  TCP  stack  to  queue a possibly large number of packets.
36       This removes the 'slow start after idle' choice,  badly  hitting  large
37       BDP  flows  and  applications  delivering  chunks of data such as video
38       streams.
39
40

PARAMETERS

42   limit
43       Hard limit on the real queue size. When  this  limit  is  reached,  new
44       packets  are  dropped.  If the value is lowered, packets are dropped so
45       that the new limit is met. Default is 10000 packets.
46
47   flow_limit
48       Hard limit on the maximum number of packets queued per  flow.   Default
49       value is 100.
50
51   quantum
52       The  credit  per  dequeue  RR round, i.e. the amount of bytes a flow is
53       allowed to dequeue at once. A larger value means a longer  time  period
54       before  the  next  flow  will  be served.  Default is 2 * interface MTU
55       bytes.
56
57   initial_quantum
58       The initial sending rate credit, i.e. the amount of bytes a new flow is
59       allowed  to  dequeue  initially.   This  is specifically meant to allow
60       using IW10 without added delay.  Default is 10 *  interface  MTU,  i.e.
61       15140 for 'standard' ethernet.
62
63   maxrate
64       Maximum  sending  rate  of  a flow.  Default is unlimited.  Application
65       specific setting via SO_MAX_PACING_RATE is ignored only if it is larger
66       than this value.
67
68   buckets
69       The  size  of  the  hash  table  used  for flow lookups. Each bucket is
70       assigned a red-black tree for efficient  collision  sorting.   Default:
71       1024.
72
73   orphan_mask
74       For  packets  not  owned  by  a  socket,  fq  is able to mask a part of
75       skb->hash and reduce number of buckets  associated  with  the  traffic.
76       This  is  a DDOS prevention mechanism, and the default is 1023 (meaning
77       no more than 1024 flows are allocated for these packets)
78
79   [no]pacing
80       Enable or disable flow pacing. Default is enabled.
81
82   ce_threshold
83       sets a threshold above which all packets are marked with ECN Congestion
84       Experienced.  This  is  useful for DCTCP-style congestion control algo‐
85       rithms that require marking at very shallow queueing thresholds.
86
87

EXAMPLES

89       #tc qdisc add dev eth0 root fq ce_threshold 4ms
90       #tc -s -d qdisc show dev eth0
91       qdisc fq 8001: dev eth0 root refcnt  2  limit  10000p  flow_limit  100p
92       buckets  1024  orphan_mask  1023  quantum  3028b initial_quantum 15140b
93       low_rate_threshold 550Kbit refill_delay 40.0ms ce_threshold 4.0ms
94        Sent 72149092 bytes 48062 pkt (dropped 2176, overlimits 0 requeues 0)
95        backlog 1937920b 1280p requeues 0
96         flows 34 (inactive 17 throttled 0)
97         gc 0 highprio 0 throttled 0 ce_mark 47622 flows_plimit 2176
98

SEE ALSO

100       tc(8), socket(7)
101

AUTHORS

103       FQ was written by Eric Dumazet.
104
105
106
107iproute2                         10 Sept 2015                            FQ(8)
Impressum