WIPIVERSE All articles

Active queue management

Active Queue Management (AQM) is a class of techniques used in network routers and switches to manage the length of packet queues proactively. Unlike traditional passive queue management (such as tail-drop), which discards incoming packets only when the queue buffer is completely full, AQM algorithms detect incipient congestion—typically by monitoring average queue length or instantaneous queue size—and signal congestion to endpoints (usually by dropping or marking packets) before the buffer overflows.

Primary Objectives

  • Reduce End-to-End Latency: By maintaining shorter average queue lengths, AQM minimizes queuing delay and jitter for traversing packets.
  • Prevent Global Synchronization: Tail-drop mechanisms can cause multiple TCP connections to reduce their transmission rates simultaneously, followed by a simultaneous ramp-up, leading to oscillating link utilization. AQM mitigates this by dropping packets randomly or deterministically at different times for different flows.
  • Improve Link Utilization: Early congestion signaling allows transport protocols (like TCP) to adjust congestion windows before the queue fills completely, preventing periods of link underutilization caused by buffer exhaustion.
  • Support Explicit Congestion Notification (ECN): Many AQM implementations can mark the ECN field in the IP header (RFC 3168) instead of dropping packets, signaling congestion without data loss.

Common Algorithms

  • Random Early Detection (RED): The foundational AQM algorithm (Sally Floyd and Van Jacobson, 1993). It calculates an exponentially weighted moving average (EWMA) of the queue length. When the average exceeds a minimum threshold, it drops/marks packets with a probability that increases linearly until a maximum threshold is reached, after which all packets are dropped.
  • Weighted RED (WRED): Extends RED by assigning different drop thresholds and probabilities to different traffic classes (e.g., based on IP precedence or DSCP), providing Quality of Service (QoS) differentiation.
  • Blue: An alternative to RED that adjusts drop/mark probability based on link idle/busy events rather than queue length averages, aiming for faster reaction times and less parameter sensitivity.
  • CoDel (Controlled Delay): Developed by Kathleen Nichols and Van Jacobson (2012). It distinguishes between "good" queue (transient bursts) and "bad" queue (persistent standing queue) by measuring the minimum sojourn time (time in queue) over a sliding window. It drops packets only when the minimum sojourn time exceeds a target threshold (typically 5ms) for a sustained interval.
  • FQ-CoDel (Fair Queuing CoDel): Combines CoDel with Flow Queuing (typically Deficit Round Robin). It classifies packets into flows, schedules them fairly, and applies CoDel logic independently to each flow's queue. This isolates sparse flows (interactive, thin streams) from heavy flows (bulk transfers) without requiring flow state configuration.
  • PIE (Proportional Integral controller Enhanced): Uses a control-theoretic approach (PI controller) to calculate drop probability based on queue latency and its derivative, designed to be self-tuning and less sensitive to traffic mix.

Standardization and Deployment AQM is recommended by the Internet Engineering Task Force (IETF) in RFC 2309 (1998) and updated in RFC 7567 (2015) and RFC 8033 (2017). Modern operating systems (Linux, BSD, Windows) and network equipment vendors implement FQ-CoDel, PIE, or variants as default or recommended queue disciplines (qdiscs) to combat "bufferbloat"—the phenomenon of excessively large buffers causing high latency under load.

Browse

More topics to explore

    Browse all articles