FQ (Fair Queue) is a classless packet scheduler meant to be mostly
used for locally generated traffic. It is designed to achieve per
flow pacing. FQ does flow separation, and is able to respect pacing
requirements set by TCP stack. All packets belonging to a socket are
considered as a 'flow'. For non local packets (router workload),
packet hash is used as fallback.
An application can specify a maximum pacing rate using the
SO_MAX_PACING_RATE setsockopt call. This packet scheduler adds delay
between packets to respect rate limitation set on each socket. Note
that after linux-4.20, linux adopted EDT (Earliest Departure Time)
and TCP directly sets the appropriate Departure Time for each skb.
Dequeueing happens in a round-robin fashion. A special FIFO queue is
reserved for high priority packets ( TC_PRIO_CONTROL priority), such
packets are always dequeued first.
FQ is non-work-conserving.
TCP pacing is good for flows having idle times, as the congestion
window permits TCP stack to queue a possibly large number of packets.
This removes the 'slow start after idle' choice, badly hitting large
BDP flows and applications delivering chunks of data such as video
Hard limit on the real queue size. When this limit is reached, new
packets are dropped. If the value is lowered, packets are dropped so
that the new limit is met. Default is 10000 packets.
Hard limit on the maximum number of packets queued per flow. Default
value is 100.
The credit per dequeue RR round, i.e. the amount of bytes a flow is
allowed to dequeue at once. A larger value means a longer time period
before the next flow will be served. Default is 2 * interface MTU
The initial sending rate credit, i.e. the amount of bytes a new flow
is allowed to dequeue initially. This is specifically meant to allow
using IW10 without added delay. Default is 10 * interface MTU, i.e.
15140 for 'standard' ethernet.
Maximum sending rate of a flow. Default is unlimited. Application
specific setting via SO_MAX_PACING_RATE is ignored only if it is
larger than this value.
The size of the hash table used for flow lookups. Each bucket is
assigned a red-black tree for efficient collision sorting. Default:
For packets not owned by a socket, fq is able to mask a part of
skb->hash and reduce number of buckets associated with the traffic.
This is a DDOS prevention mechanism, and the default is 1023 (meaning
no more than 1024 flows are allocated for these packets)
Enable or disable flow pacing. Default is enabled.
sets a threshold above which all packets are marked with ECN
Congestion Experienced. This is useful for DCTCP-style congestion
control algorithms that require marking at very shallow queueing
This page is part of the iproute2 (utilities for controlling TCP/IP
networking and traffic) project. Information about the project can
be found at
If you have a bug report for this manual page, send it to
email@example.com, firstname.lastname@example.org. This page was obtained
from the project's upstream Git repository
2020-08-13. (At that time, the date of the most recent commit that
was found in the repository was 2020-06-24.) If you discover any
rendering problems in this HTML version of the page, or you believe
there is a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
iproute2 10 Sept 2015 FQ(8)