1 / 16

Understanding TCP Congestion Control Mechanisms

Learn about TCP congestion control principles, mechanisms, and popular flavors. Explore how TCP manages congestion and the role of flow control in the transport layer.

Download Presentation

Understanding TCP Congestion Control Mechanisms

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 Flow control Outline Transport Layer

  2. Congestion: informally: “too many sources sending too much data too fast for network to handle” manifestations: lost packets (buffer overflow at routers) long delays (queuing in router buffers) Principles of Congestion Control Transport Layer

  3. two senders, two receivers one router, infinite buffers large delays when congested lout lin : original data unlimited shared output link buffers Host A Host B Causes/costs of congestion: scenario 1 Transport Layer

  4. one router, finite buffers sender retransmission of lost packet Causes/costs of congestion: scenario 2 Host A lout lin : original data l'in : original data, plus retransmitted data Host B finite shared output link buffers Transport Layer

  5. four senders multihop paths timeout/retransmit Host A Host B Causes/costs of congestion: scenario 3 Q:what happens as number of senders increase? lout lin : original data l'in : original data, plus retransmitted data finite shared output link buffers Transport Layer

  6. TCP congestion control: cwnd • goal: TCP sender should transmit as fast as possible, but without congesting network • Q: how to find rate just below congestion level • each TCP sender sets its own rate, called congestion window (cwnd) based on implicit feedback: • ACK: segment received (a good thing!), • network not congested • so increase sending rate • lost segment: assume loss due to congested network, so decrease sending rate Transport Layer

  7. time TCP Slow Start Host A Host B one segment RTT two segments four segments Transport Layer

  8. TCP: congestion avoidance Increasing sending rate: • How far would the doubling of cwnd go? • Till, it reaches a threshold • After that it increases linearly What if a loss happens? • Decrease sending rate • Set the threshold value to half of current cwnd • loss: decrease cwnd to 1 and start the slow-start again Transport Layer

  9. Popular “flavors” of TCP TCP Reno ssthresh cwnd window size (in segments) ssthresh TCP Tahoe Transmission round Transport Layer

  10. Summary: TCP Congestion Control • when cwnd < ssthresh, sender in slow-start phase, window grows exponentially. • when cwnd >= ssthresh, sender is in congestion-avoidance phase, window grows linearly. • when loss/timeout occurs, ssthresh set to cwnd/2, cwnd set to 1 Transport Layer

  11. TCP Congestion Control • Numerical example: Assume TCP Tahoe • Initial ssthreshold = 14 • First loss occurrence after 9 transmissions. What would be the current congestion window and ssthreshold? Transport Layer

  12. receive side of TCP connection has a receive buffer: speed-matching service: matching send rate to receiving application’s drain rate flow control sender won’t overflow receiver’s buffer by transmitting too much, too fast (currently) unused buffer space application process IP datagrams TCP data (in buffer) TCP Flow Control • app process may be slow at reading from buffer Transport Layer

  13. (suppose TCP receiver discards out-of-order segments) unused buffer space: = rwnd = RcvBuffer-[LastByteRcvd - LastByteRead] receiver: advertises unused buffer space by including rwnd value in segment header sender: limits # of unACKed bytes to rwnd guarantees receiver’s buffer doesn’t overflow (currently) unused buffer space application process IP datagrams TCP data (in buffer) rwnd RcvBuffer TCP Flow control: how it works Transport Layer

  14. multimedia apps often do not use TCP do not want rate throttled by congestion control instead use UDP: pump audio/video at constant rate, tolerate packet loss UDP Transport Layer

  15. “no frills,” “bare bones” Internet transport protocol “best effort” service, UDP segments may be: lost delivered out of order to app connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others Why is there a UDP? no connection establishment (which can add delay) simple: no connection state at sender, receiver small segment header no congestion control: UDP can blast away as fast as desired UDP: User Datagram Protocol [RFC 768] Transport Layer

  16. often used for streaming multimedia apps loss tolerant rate sensitive UDP: more 32 bits source port # dest port # Length, in bytes of UDP segment, including header checksum length Application data (message) UDP segment format Transport Layer

More Related