250 likes | 361 Vues
TCP Congestion Control. 컴퓨터공학과 인공지능 연구실 서 영우. Contents. 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit 5. Fast recovery. Introduction. Explosive growth in Internet internet gateways drop 10% of the incoming packets base idea
E N D
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우
Contents • 1. Introduction • 2. Slow-start • 3. Congestion avoidance • 4. Fast retransmit • 5. Fast recovery
Introduction • Explosive growth in Internet • internet gateways drop 10% of the incoming packets • base idea • achieving network stability by forcing the trasport connection to obey a ‘packet conservation’ principle • Conservation of packets • A new packet isn’t put into the network until an old packet leaves
Cont’d • Conservation of packets • 1. Round-trip-time variance estimation • 2. Exponential retransmit timer backoff • 3. Slow-start • 4. more aggressive receiver ack policy • 5. Dynamic window sizing on congestion
Cont’d • Ways for packet conservation to fail: • The connection doesn’t get to equilibrium • A sender injects a new packet before an old packet has exited • The equilibrium can’t be reached because of resource limits along the path
Slow-start • Definition • Whenever starting traffic on a new connection or increasing traffic after a period of congestion, start the congestion window at the size of a single segment and increase the congestion window by one segment each time an acknowledgement arrives[Douglas E. Comer, 1995] • It operates by observing that the rate at which new packets should be injected into the network is the rate at which the acknowledgments are returned by the other end.
Slow-start(1) • Self clocking • the sender uses acks as a ‘clock’ to strobe new packets into the network • automatically adjust to bandwidth and delay variations and have a wide dynamic range • slow-start • to gradually increase the amount of data in-transit • cwnd, add a congestion window to the per-connection state • When starting or restarting after a loss, set cwnd to one packet(typically 536 or 512) • On each ack for new data, increase cwnd by one packet • When sending, send the minimum of the receiver’s advertised window and cwnd.
Figure 1: Window Flow Control ‘Self-clocking’ Figure 2: The Chronology of Slow-start
Figure 3: Startup behavior of TCP without slow-start Figure 4: Startup behavior of TCP with slow-start
Round-trip timing • Good RTT estimator • the core of the retransmit timer; is the single most important feature of any protocol implementation that expects to survive heavy load.
Round-trip timing (1) • Problem • it can’t keep up with wide fluctuations in the RTT, causing unnecessary retransmissions. • Calculating the RTO based on both the mean and variance provides much better response to wide fluctuations in the RTT
Congestion avoidance • Definition • Upon loss of a segment, reduce the congestion window by half(down to minimum of at least one segment). For those segments that remain in the allowed window, backoff the retransmission timer exponentially[Douglas E. Comer, 1995] • Assumption • packet loss caused by damage is very small (much less than 1%), therefore the loss of a packet signals congestion somewhere in the network between the source and destination
Congestion avoidance(1) • [Jain, R., Ramakrishan, K., and Chiu, D.-M., 1987] • The network must be able to signal the transport endpoints that congestion is occurring • The endpoints must have a policy that decreases utilization if this signal is received and increases utilization if the signal isn’t received.
Congestion avoidance(2) • DEC/ISO scheme
Congestion avoidance(3) • Congestion avoidance • On any time out, set cwnd to half the current window size (multiplicative decrease) • On each ack for new data, increase cwnd by 1/cwnd (additive increase) • When sending, send the minimum of the receiver’s advertised window and cwnd
Figure 8:Multiple, simultaneous TCPs with no congestion avoidance Figure 9:Multiple, simultaneous TCPs with congestion avoidance
Operations of combined algorithm • Congestion window and slow-start threshold size • 1. cwnd = one segment size (512, 536), ssthresh = 65535 • 2. TCP output routine never sends more than the min. of cwnd and the receiver’s advertised window • 3. When congestion occurs, one-half of the current window size, but at is saved in ssthresh • 4. When new data is acknowledge by the other end, increase cwnd, but the way it increase depends on whether TCP is performing slow start or congestion avoidance
Cont’d • If cwnd is less than or equal to ssthresh, we’re doing slow start; otherwise we’re doing congestion avoidance • Additive increase: • Congestion avoidance dictates that cwnd be incremented by 1/cwnd each time an ACK is received. • to increase cwnd by at most one segment each RTT(regardless how many ACKs are received in that RTT), whereas slow start will increment cwnd by the number of ACKs received in a RTT.
Fast Retransmit • duplicate ACK • should not be delayed. • to let the other end know that a segment was received out of order, and to tell it what sequence number is expected. • check the number of duplicate ACKs to be received. • one or two: reordering of the segments • three or more: lost segments • performs a retransmission of what appears to be the missing segment, without waiting for a retransmission timer to expire
Fast Recovery • Definition • After fast retransmit sends what appears to be the missing segment, congestion avoidance, but not slow start is performed. • Reason for fast recovery • there is still data flowing between the two ends, and TCP does not want to reduce the flow abruptly by going into slow start
Operations of combined algorithm • Steps • 1. When the third duplicate ACK is received, set ssthresh to one-half the current cwnd. Retransmit the missing segment. Set cwnd to ssthresh plus 3 times the segment size. • 2. Each time another duplicate ACK arrives, increment cwnd by the segment size and transmit a packet
Cont’d • 3. When the next ACK arrives that acknowledges new data, set cwnd to ssthresh. This should be the ACK of the retransmission from step 1. Additionally, this ACK should acknowledge all the intermediate segments sent between the lost packet and the receipt of the first duplicate ACK.