"Slow Start" in TCP
By adding end-to-end flow control, "slow start" overcomes the shortcoming of "sliding window" protocol. "slow start" is a kind of "sliding window", the difference between "sliding window" and "slow start" is that "slow start" allows various window size while "sliding window" has fixed window size.
"slow start" increases total throughput by keeping networks busy as in "sliding window" and also it solves end-to-end flow control by allowing the receiver to restrict transmission until it has sufficient buffer space to accommodate more data. Whenever the receiver sends ACK, the available buffer space is attached to the ACK (which is known as 'window advertisement'), so that the sender can decide its window size.
In TCP, the window size is defined as the minimum value between cwnd (congestion window size) and window advertisement. At any time, the window size cannot be greater than maximum cwnd which is fixed.
Not only when the sender starts to transmit at the first time, but also after collision and after idle periods between the sender and the receiver, TCP transmits its data in "slow start" fashion.
2. How this protocol works..
1) Normal operation
||The basic idea behind "slow start" is to send packets as much as the
network can accept. It starts to transmit 1 packet and if the that packet
is transmitted successfuly and receives an ACK, it increases its window
size to 2, and after receiving 2 ACKs it increases its window size to 4,
and then 8, and so on.. "slow start" increases its window size exponentially.
||If there is packet loss, "slow start" only sends that lost packet.
This mechanism is known as "Selective Repeat".
To do that the receiver keeps a record of correctly received packet numbers and ack the last successful packet number to the sender.
3. How it is shown in nam (network animator)..
"sliding-window" protocol can be shown as follows in nam.
||When the sender starts to transmit its data for the first time, it sends only 1 packet.|
||The Receiver sends 1 ACK to the sender.|
|After the sender receives the ACK, it increases its window size to 2 and sends 2 packets to the receiver.|
|The Receiver sends 2 ACKs to the sender.|
|After the sender receives the 2 ACKs, it increases its window size
to 4 and sends 4 packets to the receiver.
If the sender receives another 4 ACKs correctly, it will increase its window size to 8. In this way, "slow start" increase its window size exponentially.
If the network bandwidth is always fixed for
the traffic, "sliding window" could have better performance than that of
"slow start's" if "sliding window" is well adjusted. But, in the Internet
environment where the traffic amount is not fixed, "slow start" could have
better performance than that of "sliding window".
The detail comparison about this will be discussed with an example here.