TCP Congestion Control

TCP Congestion Control

  • Congestion occurs when total arrival rate from all packet flows exceeds R over a sustained(维持) period of time
  • Buffers(缓冲) at multiplexer will fill and packets will be lost

Phases of Congestion Behavior

  1. Light traffic
    • Arrival Rate << R
    • Low delay
    • Can accommodate(容纳) more
  2. Knee (congestion onset)
    • Arrival rate approaches R
    • Delay increases rapidly
    • Throughput(吞吐量) begins to saturate(饱和)
  3. Congestion collapse
    • Arrival rate > R
    • Large delays, packet loss
    • Useful application throughput drops

Congestion Window

  • Desired operating point: just before knee
  • TCP sender maintains a congestion window (cwnd) to control congestion at intermediate(中间的) routers
  • Effective window is minimum of congestion window and advertised window(广播窗口)
  • Problem: senders does not know what its “fair” share of available bandwidth should be
  • Solution:
    • adapt dynamically to available BW
    • Senders probe(探查) the network by increasing cwnd
    • When congestion detected, senders reduce rate
    • Ideally, sending rate stabilizes(稳定) near optimal(最优) point

Congestion Window (Cont.)

  • How does the TCP congestion algorithm change congestion window dynamically according to the most up-to-date state of the network?
  • At light traffic: each segment is ACKed quickly
    • Increase cwnd aggresively
  • At knee: segment ACKs arrive, but more slowly
    • Slow down increase in cwnd
  • At congestion: segments encounter large delays, timeout, segments are dropped in router buffers
    • Reduce transmission rate, then probe again

TCP Congestion Control (1): Slow Start

  • Slow start: increase congestion window size by one segment upon receiving an ACK from receiver
    • initialized at 2 segments; usually 1 segment
    • used at start of data transfer
    • congestion window increases exponentially(指数)

TCP Congestion Control (2): Congestion Avoidance

  • Algorithm progressively(逐步) sets a congestion threshold(门槛)
    • When cwnd > threshold, slow down rate at which cwnd is increased
  • Increase congestion window size by one segment per round-trip-time (RTT)
    • Each time an** ACK arrives**, cwnd is increased by 1/cwnd
    • In one RTT, all ccwnd segments are sent, so total increase in cwnd is cwnd x 1/cwnd = 1
    • cwnd grows linearly with time

TCP Congestion Control (3): Congestion

  • Congestion is detected upon timeout or receipt of duplicate ACKs
  • Assume current cwnd corresponds to available bandwidth
  • Adjust congestion threshold = ½ x current cwnd
  • Reset cwnd to 1
  • Go back to slow-start
  • Over several cycles expect to converge(收敛) to congestion threshold equal to about ½ the available bandwidth

Fast Retransmit & Fast Recovery

  • Congestion causes many segments to be dropped
  • Burt if only a single segment is dropped, then subsequent(随后的) segments trigger duplicate ACKs before timeout
  • Can avoid large decrease in cwnd as follows:
    • When three duplicate ACKs arrive before timeout expires(期满), retransmit lost segment immediately
    • Reset congestion threshold to ½ cwnd
    • Reset cwnd to congestion threshold + 3 to account for the three segments that triggered duplicate ACKs
    • Remain in congestion avoidance phase
    • In absence of timeouts, cwnd will oscillate(振动) around optimal value

TCP Congestion Control: Fast Retransmit & Fast Recovery

posted @ 2017-10-21 10:29  范加索尔拉  阅读(1472)  评论(0编辑  收藏  举报