FQ_CoDel(8)
๐ FQ_CoDel โ the manual page, but make it make sense ๐
okay bestie, welcome to FQ_CoDel(8), a Linux manual page, section 8 (that's the sysadmin/daemon-ish section, iykyk). Buckle up, this one's actually kind of iconic.
โจ NAME โจ
CoDel โ Fair Queuing (FQ) with Controlled Delay (CoDel). yes that's the whole name, it's a two-for-one deal, we love a combo ๐ซถ
โจ SYNOPSIS โจ
tc qdisc ... fq_codel [ limit PACKETS ] [ flows NUMBER ] [ target TIME ]
[ interval TIME ] [ quantum BYTES ] [ ecn | noecn ] [ ce_threshold TIME
] [ ce_threshold_selector VALUE/MASK ] [ memory_limit BYTES ]
like, that's the whole vibe. tc qdisc ... fq_codel and then a lil pile of optional bracketed goodies. periodt.
โจ DESCRIPTION โจ
so FQ_Codel (Fair Queuing Controlled Delay, she's fancy) is a queuing discipline that combines Fair Queuing with the CoDel AQM scheme. two queens, one qdisc, no notes ๐
FQ_Codel uses a stochastic model to sort incoming packets into different flows, and its whole job is to hand out a fair share of the bandwidth to every flow using the queue. each one of those flows gets managed by the CoDel queuing discipline. and ngl, reordering within a flow is avoided because CoDel internally uses a FIFO queue. slay, no out-of-order chaos in this house ๐
โจ PARAMETERS โจ
๐ธ limit
same semantics as codel โ it's the hard limit on the real queue size. the moment this limit is hit, incoming packets get dropped. default is 10240 packets. rude but necessary ๐
๐ธ memory_limit
puts a limit on the total number of bytes that can be queued in this FQ-CoDel instance. whichever is lower โ the packet limit from the limit parameter or the memory limit โ is the one that gets enforced. default is 32 MB.
๐ธ flows
the number of flows the incoming packets get classified into. because hashing is stochastic (that word again, she's everywhere), multiple flows can absolutely end up hashed into the same slot. newer flows have priority over older ones. heads up though: this parameter can only be set at load time, since memory has to be allocated for the hash table. default value is 1024.
๐ธ target
same semantics as codel โ it's the acceptable minimum standing/persistent queue delay. this minimum delay gets identified by tracking the local minimum queue delay that packets experience. default value is 5ms.
๐ธ interval
same semantics as codel โ it makes sure the measured minimum delay doesn't get too stale. the minimum delay has to be experienced within the last epoch, and an epoch is interval long. you should set it on the order of the worst-case RTT through the bottleneck, so the endpoints get enough time to react. default value is 100ms.
๐ธ quantum
the number of bytes used as the 'deficit' in the fair queuing algorithm. default is 1514 bytes, which corresponds to the Ethernet MTU plus the hardware header length of 14 bytes. math! ate ๐
๐ธ ecn | noecn
same semantics as codel โ you can use this to mark packets instead of dropping them. if ecn is enabled, noecn turns it off, and vice-a-versa (their spelling, not mine, but I respect it). and here's the plot twist: unlike codel, ecn is turned on by default. main character energy โจ
๐ธ ce_threshold
sets a threshold above which all packets get marked with ECN Congestion Experienced. super useful for DCTCP-style congestion control algorithms that need marking at very shallow queueing thresholds.
๐ธ ce_threshold_selector
sets a filter so the ce_threshold feature only applies to a subset of the traffic the qdisc sees. if it's set, the MASK value gets applied as a bitwise AND to the diffserv/ECN byte of the IP header, and only if the result of that masking equals VALUE will the ce_threshold logic be applied to the packet. very "only some of y'all" of it ๐ฆ
๐ธ drop_batch
sets the maximum number of packets to drop when limit or memory_limit is exceeded. default value is 64.
โจ EXAMPLES โจ
first up, the classic:
#tc qdisc add dev eth0 root fq_codel
#tc -s qdisc show
qdisc fq_codel 8002: dev eth0 root refcnt 2 limit 10240p flows 1024
quantum 1514
target 5.0ms interval 100.0ms ecn
Sent 428514 bytes 2269 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 256 drop_overlimit 0 new_flow_count 0 ecn_mark 0
new_flows_len 0 old_flows_len 0
and now the spicy one, with custom numbers and noecn:
#tc qdisc add dev eth0 root fq_codel limit 2000 target 3ms interval 40ms
noecn
#tc -s qdisc show
qdisc fq_codel 8003: dev eth0 root refcnt 2 limit 2000p flows 1024
quantum 1514 target 3.0ms interval 40.0ms
Sent 2588985006 bytes 1783629 pkt (dropped 0, overlimits 0 requeues
34869)
backlog 0b 0p requeues 34869
maxpacket 65226 drop_overlimit 0 new_flow_count 73 ecn_mark 0
new_flows_len 1 old_flows_len 3
look at those requeues 34869, she's been through things ๐ญ
โจ SEE ALSO โจ
go read those next, bestie, it's a whole cinematic universe ๐
โจ AUTHORS โจ
FQ_CoDel was implemented by Eric Dumazet. this manpage was written by Vijay Subramanian. corrections should be reported to the Linux Networking mailing list <netdev@vger.kernel.org>. give them their flowers ๐
and that's the whole thing! this page comes to you from iproute2, dated 4 June 2012 โ yeah she's an elder but she still runs the internet's queues, no cap. go forth and shape your traffic, queen ๐๐๐ฆโจ
๐ฆ where this page comes from
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- nixpkgs unstable: iproute2 7.2.0
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms