Skip to content
Related Articles

Related Articles

Fast Recovery Technique For Loss Recovery in TCP

View Discussion
Improve Article
Save Article
Like Article
  • Difficulty Level : Expert
  • Last Updated : 02 Mar, 2022

When the RTO timer expires but an ACK is not received, the sender confirms that the packet is lost due to congestion at intermediary devices. Now sender has to tackle this congestion state carefully. Fast Recovery is the packet loss recovery technique. Recovery means becoming inactive and not transmitting any new packet for some time.

When there is a packet loss detected, the TCP sender does 4 things:

  1. Reduces the cwnd by 50%.
  2. Reduces the ssthresh value by 50% of cwnd.
  3. Retransmit the lost packet.
  4. Enters the Fast Recovery phase.

Fast Recovery Phase:

This comprises of two parts: 

  1. The half window of silence
  2. Maintain the inflight=cwnd until a new ACK arrives at the sender side.

The half window of silence is the amount of time the sender becomes silent(inactive) and waits for inflight to become equal to cwnd. Because cwnd is reduced to its half when packet loss is detected. Before that inflight was exactly equal to cwnd, but now inflight is approximately double of cwnd value. So, the sender doesn’t transmit any new packet neither it increases its cwnd by 1 per ACK. The sender will keep on getting DUP-ACK until the receiver receives the retransmitted packet. 

After the inflight becomes equal to cwnd, the half window of silence ends here, now also DUP-ACK will keep coming, so the sender doesn’t increase its cwnd but it will maintain an inflight value equal to cwnd. When one DUP-ACK comes, the inflight becomes 1 less than the previous value, so to maintain inflight=cwnd sender transmits one new packet into the network. When finally the receiver gets the retransmitted packet and it sends a new ACK to the sender, then the sender will come out of the Fast Recovery phase and immediately enter the AIMD phase. The sender comes out of the recovery phase because it has confirmed that the lost packet is received by the receiver and thus the network is no longer congested. But, it has to carefully increase the cwnd to avoid subsequent congestion too early, thus entering AIMD hereafter.

Fast Recovery Technique:

Fast Recovery technique used in TCP Reno and TCPNewreno:

It faces a problem called “Half window of silence”. It leads to the under-utilization of the available network resources. Because while the sender is silent the network bandwidth is wasted. Another problem is that it stalls the application, leading to frustration for the end-user. If the sender is not sending the data then the receiver will have to wait, this results in delay in data and a bad user experience. So, What is the solution?

One solution is to improve the estimation of ‘inflight’ data by using SACK (knowledge of gaps in receiver buffer). If the sender knows the updated ‘inflight’ value then the half window of silence will be over soon. Another solution is the Rate halving technique (previously, default in Linux). One more advanced solution is Proportional Rate Reduction (current default in Linux and defined in RFC 6937). 

Fast Recovery without SACK:

Fast Recovery without SACK

Fast Recovery without SACK

Before Fast Recovery:
cwnd = 10, inflight = 10

Initial stage when Fast Recovery begins:
cwnd = 5, ssthresh = 5, inflight = pipe = 10

The half window of silence until the pipe becomes equal to cwnd.

  1. DUP-ACK arrives at the sender: pipe=10-1=9
  2. DUP-ACK arrives at the sender: pipe=9-1=8
  3. DUP-ACK arrives at the sender: pipe=8-1=7
  4. DUP-ACK arrives at the sender: pipe=7-1=6
  5. DUP-ACK arrives at the sender: pipe=6-1=5. Now, cwnd=pipe, silence breaks now.
  6. DUP-ACK arrives at the sender: pipe=5-1=4, pipe<cwnd, the sender transmits a new packet, pipe=4+1=5
  7. DUP-ACK arrives at the sender: pipe=5-1=4, pipe<cwnd, the sender transmits a new packet, pipe=4+1=5

This continues, till retransmitted packet is ACKed by the receiver.

Fast Recovery with SACK:

It suffers from burst transmissions. When the network is losing the packets, the sender is sending a bunch of packets simultaneously which affects the network badly.

Fast Recovery with SACK

Fast Recovery with SACK

Initial state:

pipe = 5 segments
cwnd= 5 segments
ssthresh = 5 segments

This is the case when half the window of silence is over and pipe=cwnd.

DUP-ACK arrives with SACK blocks, SACK block tells that 3 packets are lost.

pip= 5-1-3= 1
pipe < cwnd 

New packets need to be transmitted = cwnd-pipe

Now, the sender will send 4 new packets. This is called burst transmission.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!