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