Blame man/man8/tc-fq.8

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