Debian Codegraph @

upstream/debian-unstable/man8/tc-fq.8

raw
1 .TH FQ 8 "10 Sept 2015" "iproute2" "Linux"
2 .SH NAME
3 FQ \- Fair Queue traffic policing
4 .SH SYNOPSIS
5 .B tc qdisc ... fq
6 [
7 .B limit
8 PACKETS ] [
9 .B flow_limit
10 PACKETS ] [
11 .B quantum
12 BYTES ] [
13 .B initial_quantum
14 BYTES ] [
15 .B maxrate
16 RATE ] [
17 .B buckets
18 NUMBER ] [
19 .B orphan_mask
20 NUMBER ] [
21 .B pacing
22 |
23 .B nopacing
24 ] [
25 .B ce_threshold
26 TIME ]
27
28 .SH DESCRIPTION
29 FQ (Fair Queue) is a classless packet scheduler meant to be mostly
30 used for locally generated traffic. It is designed to achieve per flow pacing.
31 FQ does flow separation, and is able to respect pacing requirements set by TCP stack.
32 All packets belonging to a socket are considered as a 'flow'.
33 For non local packets (router workload), packet hash is used as fallback.
34
35 An application can specify a maximum pacing rate using the
36 .B SO_MAX_PACING_RATE
37 setsockopt call. This packet scheduler adds delay between packets to
38 respect rate limitation set on each socket. Note that after linux-4.20, linux adopted EDT (Earliest Departure Time)
39 and TCP directly sets the appropriate Departure Time for each skb.
40
41 Dequeueing happens in a round-robin fashion.
42 A special FIFO queue is reserved for high priority packets (
43 .B TC_PRIO_CONTROL
44 priority), such packets are always dequeued first.
45
46 FQ is non-work-conserving.
47
48 TCP pacing is good for flows having idle times, as the congestion
49 window permits TCP stack to queue a possibly large number of packets.
50 This removes the 'slow start after idle' choice, badly hitting
51 large BDP flows and applications delivering chunks of data such as video streams.
52
53 .SH PARAMETERS
54 .SS limit
55 Hard limit on the real queue size. When this limit is reached, new packets
56 are dropped. If the value is lowered, packets are dropped so that the new limit is
57 met. Default is 10000 packets.
58 .SS flow_limit
59 Hard limit on the maximum number of packets queued per flow.
60 Default value is 100.
61 .SS quantum
62 The credit per dequeue RR round, i.e. the amount of bytes a flow is allowed to
63 dequeue at once. A larger value means a longer time period before the next flow
64 will be served.
65 Default is 2 * interface MTU bytes.
66 .SS initial_quantum
67 The initial sending rate credit, i.e. the amount of bytes a new flow is allowed
68 to dequeue initially.
69 This is specifically meant to allow using IW10 without added delay.
70 Default is 10 * interface MTU, i.e. 15140 for 'standard' ethernet.
71 .SS maxrate
72 Maximum sending rate of a flow. Default is unlimited.
73 Application specific setting via
74 .B SO_MAX_PACING_RATE
75 is ignored only if it is larger than this value.
76 .SS buckets
77 The size of the hash table used for flow lookups. Each bucket is assigned a
78 red-black tree for efficient collision sorting.
79 Default: 1024.
80 .SS orphan_mask
81 For packets not owned by a socket, fq is able to mask a part of skb->hash
82 and reduce number of buckets associated with the traffic. This is a DDOS
83 prevention mechanism, and the default is 1023 (meaning no more than 1024 flows
84 are allocated for these packets)
85 .SS [no]pacing
86 Enable or disable flow pacing. Default is enabled.
87 .SS ce_threshold
88 sets a threshold above which all packets are marked with ECN Congestion
89 Experienced. This is useful for DCTCP-style congestion control algorithms that
90 require marking at very shallow queueing thresholds.
91
92 .SH EXAMPLES
93 #tc qdisc add dev eth0 root fq ce_threshold 4ms
94 .br
95 #tc -s -d qdisc show dev eth0
96 .br
97 qdisc fq 8001: dev eth0 root refcnt 2 limit 10000p flow_limit 100p buckets 1024 orphan_mask 1023 quantum 3028b initial_quantum 15140b low_rate_threshold 550Kbit refill_delay 40.0ms ce_threshold 4.0ms
98 Sent 72149092 bytes 48062 pkt (dropped 2176, overlimits 0 requeues 0)
99 backlog 1937920b 1280p requeues 0
100 flows 34 (inactive 17 throttled 0)
101 gc 0 highprio 0 throttled 0 ce_mark 47622 flows_plimit 2176
102 .br
103 .SH SEE ALSO
104 .BR tc (8),
105 .BR socket (7)
106 .SH AUTHORS
107 FQ was written by Eric Dumazet.