TCP Congestion Control

TCP Congestion Control

Overview of TCP Congestion Control

  • TCP (Transmission Control Protocol) manages congestion in order to maintain efficient and effective transmission rates across networks.
  • The process involves both the sender and potentially the network (routers, etc.) to adapt to changing conditions.

1. Approaches to Congestion Control

  • Loss-Based Approach:
    • Mechanism: The sender increases the sending rate until packet loss is detected, then decreases the rate accordingly.
    • Timeouts: Response involves a timeout when a packet is lost.
    • RTT Measurement: Delay-based methods increase the rate until the round-trip time (RTT) reaches a congested state.
  • Network-Assisted Approach:
    • Involves cooperation between sender, network routers, and receiver.

2. TCP’s AIMD (Additive Increase-Multiplicative Decrease)

  • How It Works:
    • Increases the sending rate by increasing the congestion window (cwnd) until a loss occurs.
    • Upon detecting loss, it either cuts the sending rate in half (Multiplicative Decrease).
    • Sawtooth Behavior: Sending rate follows a sawtooth pattern, probing for bandwidth.
Details of AIMD:
  • Additive Increase (AI): Increase cwnd by 1 MSS (Maximum Segment Size) for each RTT until loss is detected.
  • Multiplicative Decrease (MD): On loss event, cut the cwnd in half.
  • Versions:
    • TCP Reno: Cuts the cwnd roughly in half upon detection via triple duplicate ACKs.
    • TCP Tahoe: Cuts the cwnd to 1 MSS following a timeout or loss event.

3. TCP Congestion Control States

  • Three States:
    • Slow Start:
    • Initiates with cwnd = 1 MSS, increases exponentially until the first loss.
    • Congestion Avoidance:
    • Linear increase strategy kicks in when the cwnd reaches half of the previous maximum value.
    • Fast Recovery:
    • Reacts to duplicate acknowledgments, adjusts cwnd accordingly.
  • Transition Rules:
    • Slow Start Threshold (ssthresh): When a loss occurs, ssthresh is set to half the cwnd before loss.

4. TCP CUBIC

  • Comparison with Reno:
    • More aggressive initially, then becomes conservative as it approaches the maximum window size (Wmax).
    • Adjusts the window size with respect to the cube of the distance from K (the point where the window reaches Wmax).

5. Delay-Based Congestion Control

  • Objective: Monitor throughput to keep the network pipe fully utilized but not overloaded.
    • Uses measured RTT to evaluate whether network conditions are congested.
  • Throughput Calculation:
    • If throughput is close to cwnd/RTTmin, increase cwnd; if it’s low, decrease cwnd linearly.

6. Network-Assisted Congestion Control

  • Explicit Congestion Notification (ECN):
    • Uses 2 bits in the IP header to signal congestion without dropping packets.
    • Enables communication of congestion indications from routers to the sender.

7. TCP Fairness

  • Goal: Fair distribution of bandwidth among multiple TCP connections.
    • Ideal Case: Each session should have an equal share (R/K, where R is bandwidth and K is the number of TCP sessions).
  • Influencing Factors:
    • Same RTT, controlled sessions contribute to fairness; differing conditions can impact this balance.

Conclusion

  • TCP utilizes a combination of strategies for congestion control to optimize the flow of data.
  • Understanding the details of AIMD, TCP CUBIC, and network-assisted controls is essential for enhancing network reliability and performance.