Unformatted text preview:

Congestion ControlSlow StartExample of Slow StartNormal operation of Slow Start / Congestion AvoidanceSlow Start/Congestion Avoidance ExampleExample of slow start and congestion avoidanceComputation of cwnd on previous slideWhen congestion occurs: Congestion Avoidance AlgorithmMalathi VeeraraghavanOriginals by Jörg Liebeherr1Congestion Control•TCP implements congestion control at the sender–This control is intended to reduce congestion in the network.•The sender has two parameters for congestion control:–Congestion Window (cwnd; Initial value is MSS bytes)–Threshhold Value (ssthresh; Initial value is 65536 bytes)•The window size at the sender is set as follows:Allowed Window = MIN (advertised window, congestion window)advertised window: flow-control window at the receiverMSS: Maximum Segment Size (set with option field in TCP header)Malathi VeeraraghavanOriginals by Jörg Liebeherr2Slow Start•Whenever starting traffic on a new connection, or whenever increasing traffic after congestion was experienced:•Set cwnd =MSS bytes (cwnd is stored in bytes) •Each time an ACK is received, the congestion window is increased by 1 segment (= MSS bytes).•If an ACK acknowledges two segments, cwnd is still increased by only 1 segment (without byte counting)•Even if ACK acknowledges a segment that is smaller than MSS bytes long, cwnd is increased by MSS bytes.•If cwnd is 3 but there is still one outstanding ACK, the sender can only send two segments•Does Slow Start increment slowly? Not really. In fact, the increase of cwnd is exponentialMalathi VeeraraghavanOriginals by Jörg Liebeherr3Example of Slow Start•The congestion window size grows very rapidly–For every ACK, we increase cwnd by 1 irrespective of the number of segments ACK’ed –with byte-counting, the cwnd would increase by the bytes acknowledged in an ACK, which means in the example cwnd would become 4MSS when the ACK for segments 2+3 is received•TCP slows down the increase of cwnd when cwnd > ssthresh cwnd =1xMSScwnd =2xMSScwnd =3xMSScwnd =4xMSSMalathi VeeraraghavanOriginals by Jörg Liebeherr4 Normal operation of Slow Start / Congestion AvoidanceIf cwnd <= ssthresh then /* Slow Start Phase */Each time an ACK is received:cwnd = cwnd + segsize else /* cwnd > ssthresh *//* Congestion Avoidance Phase */ Each time an ACK is received:cwnd = cwnd + segsize * segsize / cwnd + segsize / 8 endifsegsize = MSSMalathi VeeraraghavanOriginals by Jörg Liebeherr5Slow Start/Congestion Avoidance Example•Assume that ssthresh = 802468101214t=0 t=1 t=2 t=3 t=4 t=5 t=6 t=7Roundtrip timesCwnd (in segments)ssthreshMalathi VeeraraghavanOriginals by Jörg Liebeherr6Example of slow start and congestion avoidance•Assume MSS=512 bytes; advertised window = 5120 bytesPSH 1:513 (512) ack 10ack 513cwnd=512; ssthresh=2560cwnd=1024PSH 1537:2049 (512) ack 10ack 3073cwnd=2560; ssthresh=2560cwnd=3072; ssthresh=2560PSH 2049:2561(512) ack 10ack 2049cwnd=3222; ssthresh=2560PSH 2561:3073(512) ack 10ack 2561Enter congestion avoidanceMalathi VeeraraghavanOriginals by Jörg Liebeherr7Computation of cwnd on previous slide•Upto and including ack 2561, this TCP connection is in slow start, and cwnd is increased by 1 MSS bytes each time an ACK is received.•Note that when cwnd = ssthresh, slow start is still applied. Hence when ack 2561 is received, cwnd = 2560+512 = 3072.•When the last ack shown on the previous slide is received, the TCP connection is in congestion avoidance since cwnd is > ssthresh. Therefore, cwnd = cwnd + MSS × MSS / cwnd + MSS / 8 = 3072 + 512 × 512/3072+512/8=3222Malathi VeeraraghavanOriginals by Jörg Liebeherr8When congestion occurs: Congestion Avoidance Algorithm•When congestion occurs (indicated by timeout), –ssthresh is set to half the current window size (the minimum of the advertised window (AW) and cwnd):ssthresh = min(cwnd,AW) / 2 but at least 2 segments –cwnd is changed according to:cwnd = 1 segsize = 1 MSS bytes (in case of timeout only)•When new data is acknowledged,cwnd is increased according to whether it is in slow start or


View Full Document

UVA ECE 136 - Congestion Control

Download Congestion Control
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Congestion Control and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Congestion Control 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?