1 / 22

TCP Congestion Control

TCP Congestion Control. TCP Tahoe TCP Reno TCP Vegas. Internet Congestion Collapse. In the late 80s, the Internet suffered a congestion collapse. Data. + Retransmissions. Host. Congestion! Packet drops!!. Host. Collapse. Host. More Drops!!!. Why is Today’s Topic Important?.

melvinp
Télécharger la présentation

TCP Congestion Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TCP Congestion Control TCP Tahoe TCP Reno TCP Vegas

  2. Internet Congestion Collapse • In the late 80s, the Internet suffered a congestion collapse Data + Retransmissions Host Congestion! Packet drops!! Host Collapse Host More Drops!!!

  3. Why is Today’s Topic Important? The algorithm for TCP congestion control is the main reason we can use the Internet successfully today despite largely unpredictable user access patterns and despite resource bottlenecks and limitations. Without TCP congestion control, the Internet could have become history a long time ago.

  4. Source 1 10-Mbps Ethernet Router Destination 1.5-Mbps T1 link 100-Mbps FDDI Source 2 Resource Management Solutions • Handling congestion • pre-allocate resources so as to avoid congestion  • control congestion if (and when) is occurs  • Two points of implementation • routers inside the network (queuing discipline)  • hosts at the edges of the network (transport protocol) 

  5. Detecting Congestion • Packet drops indicate congestion • Is that really true? • Why does it work? Packet Dst Src Drop Ack Timeout! No Ack = Congestion!

  6. Controlling Congestion – The Effect of Window Size • Note that sender’s window is equal to the number of sender packets in flight (in the network). Why? Source Destination Window A Window’s worth of packets X acks X more packets

  7. Controlling Congestion • Reduce window  less packets in the network • Increase window  more packets in the network • Idea: Concept of a congestion window– window is smaller when congestion is larger and vice versa

  8. Additive Increase, Multiplicative Decrease • Each time a packet drop occurs, slash window size in half (multiplicative decrease) • Multiplicative decrease is necessary to avoid congestion • When no losses are observed, gradually increase window size (additive increase)

  9. Source Destination … AIMD (cont) • Algorithm • increment CongestionWindow by one packet per RTT (linear increase) • divide CongestionWindow by two whenever a timeout occurs (multiplicative decrease) • In practice: increment a little for each ACK Increment = (MSS*MSS)/CongestionWindow CongestionWindow += Increment

  10. 70 60 50 40 KB 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 T ime (seconds) AIMD (cont) • Trace: sawtooth behavior

  11. Problems • What should the window size be • Initially? • Upon packet loss and timeout? • Pessimistic window size? (e.g., 1) • Additive increase is too slow in ramping up window size – short connections will not fully utilize available bandwidth • Optimistic window size? • Large initial burst may cause router queue overflow

  12. Source Destination … Slow Start • Objective: determine the available capacity quickly • Idea: • Use CongestionThreshold as an optimistic CongestionWindow estimate • begin with CongestionWindow = 1 packet • double CongestionWindow each RTT (increment by 1 packet for each ACK) • When CongestionThreshold is crossed, use additive increase

  13. Sender Receiver Packet 1 Packet 2 ACK 1 Packet 3 ACK 2 Packet 4 ACK 2 Packet 5 Packet 6 ACK 2 ACK 2 Retransmit packet 3 ACK 6 Fast Retransmit • Problem: coarse-grain TCP timeouts lead to idle periods • Fast retransmit: • Send an ack on every packet reception • Send duplicate of last ack when a packet is received out of order • Use duplicate ACKs to trigger retransmission

  14. Self Clocking and Slow Start • Each packet’s transmission is “clocked” by an ACK – no bursts develop … W=1 W=2 W=4 W=5 W=6 W=7 Slow Start

  15. Self Clocking in Operation • Each packet’s transmission is “clocked” by an ACK – no bursts develop … … W=32

  16. Self Clocking Interrupted • During timeouts, ACKs are drained from the network. Self clocking is interrupted. Next transmission causes a burst. Hence, slow start! ACKs Drained!! Lost Ack32 … … 16 packet burst W=32 Retransmission Timeout Cut window in 1/2

  17. Self Clocking and Fast Retransmit / Fast Recovery • When fast retransmit is used, the packet is retransmitted before all ACKs are drained. Slow start is not needed Lost … … Fast Retransmission W=32 Cut window in 1/2

  18. TCP Vegas • Uses congestion avoidance instead of congestion control • Vegas: Congestion avoidance: Predict and avoid congestion before it occurs • Tahoe, Reno: Congestion control: React to congestion after it occurs • Question: How to predict congestion?

  19. TCP Vegas • Idea: source watches for some sign that router’s queue is building up and congestion will happen too; e.g., • RTT grows • sending rate flattens

  20. Observation • Packet accumulation in the network can be inferred by monitoring RTT and sending rate cwnd Overloaded Router Sending Rate Bottleneck Link Sending Rate = cwnd / RTT

  21. Algorithm • Let BaseRTT be the minimum of all measured RTTs (commonly the RTT of the first packet) • If not overflowing the connection, then ExpectRate = CongestionWindow/BaseRTT • Source calculates ActualRate once per RTT • Source compares ActualRate with ExpectRate Diff = ExpectedRate - ActualRate if Diff < a increase CongestionWindow linearly else if Diff > b decrease CongestionWindow linearly else leave CongestionWindow unchanged

  22. Algorithm (cont) • Parameters • a = 1 packet • b = 3 packets

More Related