Describe the concepts of slow start and congestion avoidance in TCP.

What will be an ideal response?


Old TCPs would start a connection with the sender injecting multiple segments into the network, up to the window size advertised by the receiver. While this is OK when the two hosts are on the same LAN, if there are routers and slower links between the sender and the receiver, problems can arise. Some intermediate router must queue the packets, and it's possible for that router to run out of space.
The algorithm to avoid this is called slow start. 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 adds another window to the sender's TCP: the congestion window, called "cwnd" When a new connection is established with a host on another network, the congestion window is initialized to one segment (i.e., the segment size announced by the other end, or the default, typically 536 or 512). Each time an ACK is received, the congestion window is increased by one segment. The sender can transmit up to the minimum of the congestion window and the advertised window. The congestion window is flow control imposed by the sender, while the advertised window is flow control imposed by the receiver. The former is based on the sender's assessment of perceived network congestion; the latter is related to the amount of available buffer space at the receiver for this connection. The sender starts by transmitting one segment and waiting for its ACK. When that ACK is received, the congestion window is incremented from one to two, and two segments can be sent. When each of those two segments is acknowledged, the congestion window is increased to four. This provides an exponential growth, although it is not exactly exponential because the receiver may delay its ACKs, typically sending one ACK for every two segments that it receives. At some point the capacity of the internet can be reached, and an intermediate router will start discarding packets. This tells the sender that its congestion window has gotten too large. Early implementations performed slow start only if the other end was on a different network. Current implementations always perform slow start. Congestion Avoidance Congestion can occur when data arrives on a big pipe (a fast LAN) and gets sent out a smaller pipe (a slower WAN). Congestion can also occur when multiple input streams arrive at a router whose output capacity is less than the sum of the inputs. Congestion avoidance is a way to deal with lost packets. The assumption of the algorithm is that 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. There are two indications of packet loss: a timeout occurring and the receipt of duplicate ACKs.
Congestion avoidance and slow start are independent algorithms with different objectives. But when congestion occurs TCP must slow down its transmission rate of packets into the network, and then invoke slow start to get things going again. In practice they are implemented together.
Congestion avoidance and slow start require that two variables be maintained for each connection: a congestion window, cwnd, and a slow start threshold size, ssthresh. The combined algorithm operates as follows:
1. Initialization for a given connection sets cwnd to one segment and ssthresh to
65535 bytes.
2. The TCP output routine never sends more than the minimum of cwnd and the
receiver's advertised window.
3. When congestion occurs (indicated by a timeout or the reception of duplicate
ACKs), one-half of the current window size (the minimum of cwnd and the
receiver's advertised window, but at least two segments) is saved in ssthresh.
Additionally, if the congestion is indicated by a timeout, cwnd is set to one
segment (i.e., slow start).
4. When new data is acknowledged by the other end, increase cwnd, but the way it
increases depends on whether TCP is performing slow start or congestion
avoidance. If cwnd is less than or equal to ssthresh, TCP is in slow start; otherwise TCP is performing congestion avoidance. Slow start continues until TCP is halfway to where it was when congestion occurred (since it recorded half of the window size that caused the problem in step 2), and then congestion avoidance takes over.
Slow start has cwnd begin at one segment, and be incremented by one segment every time an ACK is received. As mentioned earlier, this opens the window exponentially: send one segment, then two, then four, and so on. Congestion avoidance dictates that cwnd be incremented by segsize*segsize/cwnd each time an ACK is received, where segsize is the segment size and cwnd is maintained in bytes. This is a linear growth of cwnd, compared to slow start's exponential growth. The increase in cwnd should be at most one segment each round-trip time (regardless how many ACKs are received in that RTT), whereas slow start increments cwnd by the number of ACKs received in a round-trip time. Many implementations incorrectly add a small fraction of the segment size (typically the segment size divided by 8) during congestion avoidance. This is wrong and should not be emulated in future releases.

Computer Science & Information Technology

You might also like to view...

Answer the following questions true (T) or false (F)

1. Consider two blocks, one within another. C++ prohibits an identifier to be declared as a variable in each of these blocks. 2. Calling something a black box is a figure of speech that conveys the idea that you cannot see inside. You know its behavior and interface but not its implementation.

Computer Science & Information Technology

Which of the following statements best describes risk transfer?

A) It shifts a portion of the risk responsibility or liability to other organizations. B) It shifts the entire risk responsibility to other organizations. C) It takes steps to eliminate or modify the risk. D) None of the above

Computer Science & Information Technology

Which of the following returns the path separator character?

a. File.pathSeparator b. File.pathSeparatorChar c. File.separator d. File.separatorChar e. None of the above.

Computer Science & Information Technology

Trace lines are applied in the ________ process

A) subtotaling B) delimiting C) filtering D) formula auditing

Computer Science & Information Technology