Loading content...
How do you get millions of independent, uncoordinated senders to fairly share limited network capacity, without any central authority dictating allocations? This is one of the most remarkable achievements in distributed systems: emergent global fairness from purely local decisions.
The answer is a deceptively simple strategy called AIMD: Additive Increase, Multiplicative Decrease. Each sender independently increases its rate slowly, additively—and when it detects congestion, it decreases its rate sharply, multiplicatively.
This asymmetric response—cautious when increasing, aggressive when decreasing—is the secret sauce that makes TCP congestion control work. It's not just an engineering hack; there's deep mathematical beauty underlying why AIMD achieves both efficiency (using all available capacity) and fairness (dividing that capacity reasonably among competing flows).
By the end of this page, you will understand the mathematical foundations of AIMD, why it converges to fairness, how different parameter choices affect behavior, and how AIMD relates to the broader TCP congestion control strategy including slow start and fast recovery.
AIMD defines how TCP adjusts its congestion window (cwnd) in response to network feedback. The algorithm has two phases:
Additive Increase:
When no congestion is detected (ACKs arriving normally, no loss or ECN marks):
cwnd = cwnd + α
Typically α = 1 MSS (Maximum Segment Size) per round-trip time.
More precisely, TCP increases cwnd by 1/cwnd for each ACK received, so that over one RTT (approximately cwnd/MSS ACKs), the total increase is:
cwnd = cwnd + (1/cwnd) × (cwnd/MSS) × MSS = cwnd + MSS
This results in linear growth of the congestion window over time.
Multiplicative Decrease:
When congestion is detected (packet loss or ECN marks):
cwnd = cwnd × β
Typically β = 0.5 (halve the window).
This is a proportional cut—the sender immediately reduces its rate by a fixed fraction, regardless of current window size.
| TCP Variant | α (Increase) | β (Decrease) | Notes |
|---|---|---|---|
| TCP Reno | 1 MSS/RTT | 0.5 | Classic AIMD |
| TCP CUBIC | Complex cubic function | 0.7 | Less aggressive decrease |
| TCP Westwood | Based on bandwidth estimate | Bandwidth-based | Rate-based increase |
| DCTCP | 1 MSS/RTT | Proportional to ECN | Smooth response |
| BBR | Model-based | Model-based | Not pure AIMD |
The Sawtooth Pattern:
AIMD's behavior over time produces the characteristic "sawtooth" pattern in cwnd:
This oscillation is not a flaw—it's the mechanism by which TCP continually probes for available capacity while avoiding prolonged congestion. The network is always explored at the boundary of its capacity.
Why additive increase instead of multiplicative? Why multiplicative decrease instead of additive? These choices aren't arbitrary—they're the only combination that guarantees convergence to fairness. We'll see the mathematical proof shortly.
One of the most remarkable properties of AIMD is that it causes competing flows to converge toward equal bandwidth shares, even though each flow operates independently with no knowledge of others.
The Setup:
Consider two flows sharing a bottleneck link with capacity C. Let:
We can visualize this in a 2D state space where the x-axis is flow 1's rate and the y-axis is flow 2's rate.
Key Lines:
AIMD Dynamics:
During Additive Increase: Both flows increase by the same absolute amount (α). In state space, this is movement along a 45° line (both coordinates increase equally).
During Multiplicative Decrease: Both flows decrease by the same factor (β). In state space, this is movement toward the origin along a line through the current point.
The Convergence Proof:
Here's the elegant argument for why AIMD converges to fairness:
Phase 1: Additive Increase
Phase 2: Multiplicative Decrease
Result: Each AI/MD cycle maintains direction toward efficiency but moves closer to fairness. Over repeated cycles, the system oscillates around the optimal point (C/2, C/2).
Why Other Combinations Fail:
| Increase | Decrease | Outcome |
|---|---|---|
| Additive | Additive | Never converges to fairness |
| Multiplicative | Multiplicative | Preserves relative share (not fair) |
| Multiplicative | Additive | Diverges from fairness |
| Additive | Multiplicative | Converges to fairness ✓ |
The beauty of AIMD is that each flow runs this algorithm independently. There's no message passing, no negotiation, no central authority. Yet the global outcome is fair sharing. This emergent coordination is why the Internet scales to billions of simultaneous connections.
Understanding AIMD's behavior allows us to derive formulas for TCP throughput in terms of network parameters.
The Sawtooth Window:
In steady state, cwnd oscillates between W_max (just before loss) and W_max/2 (just after loss), where W_max is the window size that fills the network and causes congestion.
Average Window:
Since growth is linear from W_max/2 to W_max:
W_avg = (W_max/2 + W_max) / 2 = 3W_max/4
Average Throughput:
Throughput_avg = W_avg / RTT = 3W_max / (4 × RTT)
Relating to Loss:
During one sawtooth cycle, TCP sends approximately:
One loss occurs per cycle, so:
Loss probability p ≈ 8 / (3W_max²)
Solving for W_max:
W_max ≈ √(8/(3p)) ≈ 1.22/√p
| Formula | Description | Key Insight |
|---|---|---|
| Throughput ≈ W/RTT | Basic window-rate relationship | Rate proportional to window |
| W_max ≈ 1.22/√p | Max window in terms of loss | High loss → small window |
| Throughput ≈ MSS/(RTT×√p) | Mathis formula | Standard AIMD model |
| Throughput ∝ 1/RTT | RTT dependency | High RTT → low throughput |
| Throughput ∝ 1/√p | Loss dependency | Throughput degrades gracefully |
The Mathis Equation:
Combining these insights, Mathis et al. (1997) derived the famous TCP throughput formula:
Throughput ≈ (MSS / RTT) × (C / √p)
Where C is a constant approximately 1.22 for standard TCP.
More refined versions account for timeout effects:
Throughput ≈ MSS / (RTT × √(2p/3) + RTO × 3√(3p/8) × p × (1 + 32p²))
Implications:
RTT Unfairness: Two flows with equal loss but different RTT get different throughput. The low-RTT flow gets proportionally more bandwidth.
Loss Sensitivity: Throughput drops as 1/√p. Doubling loss rate reduces throughput by ~30%. This is gentler than linear but still significant.
Efficiency Bound: To achieve high throughput on high-BDP paths, loss rate must be very low. For 10 Gbps on 100ms RTT (BDP = 125 MB), loss rate must be < 10⁻⁷ (one loss per 10 million packets!).
Classical AIMD struggles at very high speeds. Adding 1 MSS per RTT means 10,000 RTTs to reach a 10 Gbps window (assuming 1460-byte MSS). With 100ms RTT, that's 1,000 seconds (~17 minutes) to fully utilize the link after any loss! This motivated algorithms like CUBIC, which increase faster when far from capacity.
Pure AIMD would take too long to reach useful throughput from a cold start. TCP combines AIMD with additional phases for practicality:
Phase 1: Slow Start (Multiplicative Increase)
At connection start or after timeout, TCP uses exponential increase instead of additive:
cwnd = cwnd + MSS for each ACK (doubles each RTT)
This quickly probes for available capacity. "Slow" refers to comparison with the original TCP's immediate full-rate start, not to actual slow growth.
Exit Condition: cwnd reaches ssthresh (slow start threshold), or loss detected.
Phase 2: Congestion Avoidance (AIMD)
Once cwnd ≥ ssthresh, TCP switches to conservative additive increase:
cwnd = cwnd + MSS × MSS / cwnd for each ACK
This gives approximately +1 MSS per RTT—the "A" in AIMD.
On Loss: cwnd halved (or more severely for timeout), ssthresh set to new cwnd. This is the "MD" in AIMD.
Phase 3: Fast Retransmit & Fast Recovery
To avoid dropping to slow start on every loss:
Fast Retransmit: Upon receiving 3 duplicate ACKs, retransmit the lost segment immediately (don't wait for timeout).
Fast Recovery: After fast retransmit:
This allows TCP to maintain higher throughput during isolated losses—the window halves but doesn't reset to 1.
Timeout Handling:
Timeout indicates severe congestion (no ACKs at all):
This is more drastic than fast recovery because timeout suggests major network disruption.
AIMD is the steady-state behavior; slow start gets there quickly; fast recovery maintains throughput during light loss. Together, these mechanisms form TCP's complete congestion control strategy. Each addresses a different operational regime.
Classic AIMD's limitations—especially slow recovery on high-BDP paths and RTT unfairness—have motivated numerous improvements while preserving AIMD's core stability properties.
CUBIC (Linux Default):
CUBIC replaces linear increase with a cubic function centered on W_max (the window size before last loss):
W(t) = C × (t - K)³ + W_max
Where K = ∛(W_max × β / C)
Behavior:
This gives the "cubic" characteristic shape—fast when recovering, slow near congestion point, aggressive when discovering new capacity.
BBR's Departure from AIMD:
Google's BBR represents a more fundamental departure:
Model-based, not reactive: BBR explicitly estimates bottleneck bandwidth and minimum RTT, then paces at the calculated optimal rate.
No loss-driven decrease: BBR largely ignores loss as a congestion signal, except for safety bounds. It determines rate from its model.
Periodic probing: Instead of continuous exploration, BBR periodically probes for more bandwidth (raising rate briefly) and lower RTT (draining queues briefly).
Trade-offs: BBR can achieve higher throughput and lower latency than AIMD-based algorithms, but fairness between BBR and loss-based flows can be problematic. BBRv2 addresses some of these issues.
The AIMD Legacy:
Even as new algorithms emerge, AIMD principles persist:
These principles provide stability even when exact formulas differ.
Today's Internet carries traffic from dozens of congestion control algorithms simultaneously. They must coexist reasonably—not starving each other, converging to somewhat fair allocations. This requirement constrains how far new algorithms can deviate from AIMD-like behavior.
AIMD deliberately oscillates—this is a feature, not a bug. But oscillation must be bounded and stable. Understanding the dynamics helps tune algorithm parameters.
Bounded Oscillation:
In steady state, cwnd oscillates between W_max/2 and W_max. The oscillation amplitude is W_max/2, which equals half the network's BDP when AIMD is correctly tracking capacity.
Why Oscillation is Necessary:
Capacity Probing: Without increasing past current rate, TCP can't discover if more bandwidth is available.
Fairness Adjustment: As flows come and go, AIMD's oscillations allow rebalancing.
Tracking Variable Capacity: Available bandwidth changes; oscillation provides ongoing exploration.
Stability Analysis:
From control theory, AIMD is stable when:
| Factor | Impact on Stability | Impact on Efficiency |
|---|---|---|
| Larger α (faster increase) | Less stable, more oscillation | Faster recovery, higher utilization |
| Smaller β (more aggressive decrease) | More stable (larger drops) | Lower average utilization |
| Higher RTT | Less stable (slower feedback) | Slower adaptation |
| More flows | More stable (statistical multiplexing) | Fairness more critical |
| Larger buffers | Less stable (delayed feedback) | Higher latency |
Synchronization Pathology:
A dangerous failure mode occurs when multiple flows become synchronized:
This creates:
Avoiding Synchronization:
Random Early Detection (RED): Router randomly drops packets before buffer is full. Different flows experience losses at different times, desynchronizing them.
ECN Spread: Marking packets probabilistically based on queue length achieves similar effect.
Initial Window Randomization: Starting flows with slightly random initial windows spreads their phases.
Timeout Randomization: Adding jitter to RTO prevents timeouts from clustering.
In the early Internet, tail-drop routers (drop when buffer full) caused severe synchronization. All flows would hit the full buffer together, all would back off, the buffer would empty, all would ramp up, repeat. This devastated throughput. RED and ECN largely solved this, but synchronization remains a concern in any shared-resource system.
"Fairness" seems intuitive, but defining and measuring it precisely is subtle. Different metrics capture different fairness properties.
Jain's Fairness Index:
The most common metric, defined for n flows with throughputs x₁, x₂, ..., xₙ:
F = (Σxᵢ)² / (n × Σxᵢ²)
Properties:
Example: Three flows with rates 5, 5, 5 Mbps: F = (15)² / (3 × 75) = 225/225 = 1.0 (perfect)
Three flows with rates 13, 1, 1 Mbps: F = (15)² / (3 × 171) = 225/513 = 0.44 (poor)
| Fairness Type | Definition | AIMD Achieves? |
|---|---|---|
| Max-Min Fairness | Each flow gets max possible without hurting flows with less | Yes, with single bottleneck |
| Proportional Fairness | Maximizes sum of log(throughput) | Approximately, via AIMD dynamics |
| RTT Fairness | Flows get equal share regardless of RTT | No—low-RTT flows favored |
| TCP Fairness | Behaves like a standard TCP would | By definition (for Reno) |
| Intra-protocol Fairness | Fairness among same algorithm | Generally yes |
| Inter-protocol Fairness | Fairness across different algorithms | Varies, often problematic |
The RTT Unfairness Problem:
AIMD inherently favors low-RTT flows because:
Quantitatively: Two flows with RTTs R₁ and R₂ sharing a bottleneck converge to:
x₁/x₂ ≈ R₂/R₁
The flow with 10ms RTT gets ~10× the throughput of a flow with 100ms RTT!
Addressing RTT Unfairness:
Fairness vs. Efficiency Trade-off:
Strict fairness may conflict with efficiency:
Practical fairness is always a compromise based on what "fair" means in context.
AIMD achieves 'reasonable' fairness—flows converge to similar allocations, not identical ones. Small variations are acceptable. The goal is avoiding pathological cases where one flow starves another, not mathematical equality that would require coordination.
We've developed a comprehensive understanding of AIMD—the mathematical foundation of TCP congestion control. Let's consolidate the key insights:
Module Complete:
With this page, you've completed the Congestion Control Overview module. You now understand:
This foundational understanding prepares you for the next module, where we'll dive into Slow Start and Congestion Avoidance in detail—the specific algorithms that implement these principles in practice.
You've mastered the conceptual foundations of TCP congestion control. You understand not just WHAT TCP does, but WHY it does it—the mathematical, architectural, and practical considerations that shaped one of the Internet's most critical mechanisms. This knowledge forms the basis for understanding all TCP variants and the ongoing evolution of congestion control.