TC(8)
๐ TC(8) โจ choke ๐
โจ NAME โจ
okay so the manual name here is choke, and it's a choose and keep scheduler ๐
๐ง SYNOPSIS ๐ง
tc qdisc ... choke limit packets min packets max packets avpkt bytes
burst packets [ ecn ] [ bandwidth rate ] probability chance
๐ธ DESCRIPTION ๐ธ
bestie, you have to know about CHOKe ๐ญ It stands for CHOose and Keep for responsive flows, CHOose and Kill for unresponsive flows, and it's a classless qdisc that's built to spot and punish any flow hogging the queue. It's basically a variation of RED, so if you already know RED, the setup will feel super familiar ๐ฆ
๐ ALGORITHM ๐
Here's the tea โ Once the queue hits a certain average length, the scheduler grabs a random packet from the queue.
- If the packet that's about to join the queue and the packet it grabbed belong to the same flow, both get dropped ๐
- Otherwise, if the queue length is still below the maximum length, the new packet has a configurable chance of getting marked (which can mean dropped too) ๐ซถ
- If the queue length goes over
max, the new packet is always marked (or dropped) ๐ญ - If the queue length goes over
limit, the new packet is always dropped ๐
The marking probability math is the exact same as what the RED qdisc uses, so no new brain cells needed ๐ง โจ
๐ PARAMETERS ๐
The parameters are the same as RED's, with one lowkey big difference: RED counts bytes, but choke counts packets ๐ For the full rundown, check out tc-red(8) ๐
๐ SOURCE ๐
These are the papers the whole thing is based on, so you can read them if you're obsessed like me ๐
- R. Pan, B. Prabhakar, and K. Psounis, "CHOKe, A Stateless Active Queue Management Scheme for Approximating Fair Bandwidth Allocation", IEEE INFOCOM, 2000. ๐ฆ
- A. Tang, J. Wang, S. Low, "Understanding CHOKe: Throughput and Spatial Characteristics", IEEE/ACM Transactions on Networking, 2004 ๐
๐ฅ SEE ALSO ๐ฅ
tc(8), tc-red(8) โ go check these out next, they're iconic ๐
๐ฆ AUTHOR ๐ฆ
sched_choke was contributed by Stephen Hemminger ๐ซถ
Okay bestie, that's the whole page! ๐ It came from iproute2, dated August 2011, under the TC(8) label on Linux โจ Slay the queue and stay hydrated ๐ ๐ธ
๐ฆ where this page comes from
- alpine 3.22: iproute2-doc 6.15.0-r0 ยท GPL-2.0-or-later
- alpine 3.23: iproute2-doc 6.17.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute-tc 7.0.0-2.el10 ยท GPL-2.0-or-later
- centos-stream 9: iproute-tc 6.17.0-3.el9 ยท GPL-2.0-or-later
- debian bookworm: iproute2 6.1.0-3 ยท GPL-2.0-only
- debian trixie: iproute2 6.15.0-1 ยท GPL-2.0-only
- fedora 43: iproute-tc 6.14.0-2.fc43 ยท GPL-2.0-or-later
- fedora 44: iproute-tc 6.17.0-2.fc44 ยท GPL-2.0-or-later
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2.2 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6.4 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2
- ubuntu questing: iproute2 6.16.0-1ubuntu2.1 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2.2
- ubuntu resolute: iproute2 6.19.0-1ubuntu1 ยท GPL-2.0-only
- ubuntu resolute: iproute2 6.19.0-1ubuntu1.1 ยท GPL-2.0-only
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms