Blame man/man8/tc-fq.8

Packit d3f73b
.TH FQ 8 "10 Sept 2015" "iproute2" "Linux"
Packit d3f73b
.SH NAME
Packit d3f73b
FQ \- Fair Queue traffic policing
Packit d3f73b
.SH SYNOPSIS
Packit d3f73b
.B tc qdisc ... fq
Packit d3f73b
[
Packit d3f73b
.B limit
Packit d3f73b
PACKETS ] [
Packit d3f73b
.B flow_limit
Packit d3f73b
PACKETS ] [
Packit d3f73b
.B quantum
Packit d3f73b
BYTES ] [
Packit d3f73b
.B initial_quantum
Packit d3f73b
BYTES ] [
Packit d3f73b
.B maxrate
Packit d3f73b
RATE ] [
Packit d3f73b
.B buckets
Packit d3f73b
NUMBER ] [
Packit d3f73b
.B orphan_mask
Packit d3f73b
NUMBER ] [
Packit d3f73b
.B pacing
Packit d3f73b
|
Packit d3f73b
.B nopacing
Packit d3f73b
] [
Packit d3f73b
.B ce_threshold
Packit d3f73b
TIME ]
Packit d3f73b
Packit d3f73b
.SH DESCRIPTION
Packit d3f73b
FQ (Fair Queue) is a classless packet scheduler meant to be mostly
Packit d3f73b
used for locally generated traffic.  It is designed to achieve per flow pacing.
Packit d3f73b
FQ does flow separation, and is able to respect pacing requirements set by TCP stack.
Packit d3f73b
All packets belonging to a socket are considered as a 'flow'.
Packit d3f73b
For non local packets (router workload), packet hash is used as fallback.
Packit d3f73b
Packit d3f73b
An application can specify a maximum pacing rate using the
Packit d3f73b
.B SO_MAX_PACING_RATE
Packit d3f73b
setsockopt call.  This packet scheduler adds delay between packets to
Packit d3f73b
respect rate limitation set on each socket. Note that after linux-4.20, linux adopted EDT (Earliest Departure Time)
Packit d3f73b
and TCP directly sets the appropriate Departure Time for each skb.
Packit d3f73b
Packit d3f73b
Dequeueing happens in a round-robin fashion.
Packit d3f73b
A special FIFO queue is reserved for high priority packets (
Packit d3f73b
.B TC_PRIO_CONTROL
Packit d3f73b
priority), such packets are always dequeued first.
Packit d3f73b
Packit d3f73b
FQ is non-work-conserving.
Packit d3f73b
Packit d3f73b
TCP pacing is good for flows having idle times, as the congestion
Packit d3f73b
window permits TCP stack to queue a possibly large number of packets.
Packit d3f73b
This removes the 'slow start after idle' choice, badly hitting
Packit d3f73b
large BDP flows and applications delivering chunks of data such as video streams.
Packit d3f73b
Packit d3f73b
.SH PARAMETERS
Packit d3f73b
.SS limit
Packit d3f73b
Hard limit on the real queue size. When this limit is reached, new packets
Packit d3f73b
are dropped. If the value is lowered, packets are dropped so that the new limit is
Packit d3f73b
met. Default is 10000 packets.
Packit d3f73b
.SS flow_limit
Packit d3f73b
Hard limit on the maximum number of packets queued per flow.
Packit d3f73b
Default value is 100.
Packit d3f73b
.SS quantum
Packit d3f73b
The credit per dequeue RR round, i.e. the amount of bytes a flow is allowed to
Packit d3f73b
dequeue at once. A larger value means a longer time period before the next flow
Packit d3f73b
will be served.
Packit d3f73b
Default is 2 * interface MTU bytes.
Packit d3f73b
.SS initial_quantum
Packit d3f73b
The initial sending rate credit, i.e. the amount of bytes a new flow is allowed
Packit d3f73b
to dequeue initially.
Packit d3f73b
This is specifically meant to allow using IW10 without added delay.
Packit d3f73b
Default is 10 * interface MTU, i.e. 15140 for 'standard' ethernet.
Packit d3f73b
.SS maxrate
Packit d3f73b
Maximum sending rate of a flow.  Default is unlimited.
Packit d3f73b
Application specific setting via
Packit d3f73b
.B SO_MAX_PACING_RATE
Packit d3f73b
is ignored only if it is larger than this value.
Packit d3f73b
.SS buckets
Packit d3f73b
The size of the hash table used for flow lookups. Each bucket is assigned a
Packit d3f73b
red-black tree for efficient collision sorting.
Packit d3f73b
Default: 1024.
Packit d3f73b
.SS orphan_mask
Packit d3f73b
For packets not owned by a socket, fq is able to mask a part of skb->hash
Packit d3f73b
and reduce number of buckets associated with the traffic. This is a DDOS
Packit d3f73b
prevention mechanism, and the default is 1023 (meaning no more than 1024 flows
Packit d3f73b
are allocated for these packets)
Packit d3f73b
.SS [no]pacing
Packit d3f73b
Enable or disable flow pacing. Default is enabled.
Packit d3f73b
.SS ce_threshold
Packit d3f73b
sets a threshold above which all packets are marked with ECN Congestion
Packit d3f73b
Experienced. This is useful for DCTCP-style congestion control algorithms that
Packit d3f73b
require marking at very shallow queueing thresholds.
Packit d3f73b
Packit d3f73b
.SH EXAMPLES
Packit d3f73b
#tc qdisc add dev eth0 root est 1sec 4sec fq ce_threshold 4ms
Packit d3f73b
.br
Packit d3f73b
#tc -s -d qdisc sh dev eth0
Packit d3f73b
.br
Packit d3f73b
qdisc fq 800e: root refcnt 9 limit 10000p flow_limit 1000p buckets 1024 orphan_mask 1023 quantum 3028 initial_quantum 15140 low_rate_threshold 550Kbit refill_delay 40.0ms ce_threshold 4.0ms
Packit d3f73b
 Sent 533368436185 bytes 352296695 pkt (dropped 0, overlimits 0 requeues 1339864)
Packit d3f73b
 rate 39220Mbit 3238202pps backlog 12417828b 358p requeues 1339864
Packit d3f73b
  1052 flows (852 inactive, 0 throttled)
Packit d3f73b
  112 gc, 0 highprio, 212 throttled, 21501 ns latency, 470241 ce_mark
Packit d3f73b
.br
Packit d3f73b
.SH SEE ALSO
Packit d3f73b
.BR tc (8),
Packit d3f73b
.BR socket (7)
Packit d3f73b
.SH AUTHORS
Packit d3f73b
FQ was written by Eric Dumazet.