Onload TCP implements congestion control in accordance with RFC3465 and employs the NewReno algorithm with extensions for Appropriate Byte Counting (ABC).
On new or idle connections and those experiencing loss, Onload employs a Fast Start algorithm in which delayed acknowledgments are disabled, thereby creating more ACKs and subsequently ‘growing’ the congestion window rapidly. Two environment variables; EF_TCP_FASTSTART_INIT and EF_TCP_FASTSTART_LOSS are associated with the fast start - Refer to Parameter Reference for details.
During Slow Start, the congestion window is initially set to 2 × maximum segment size (MSS) value. As each ACK is received the congestion window size is increased by the number of bytes acknowledged up to a maximum 2 × MSS bytes. This allows Onload to transmit the minimum of the congestion window and advertised window size:
transmission window (bytes) = min(CWND, receiver advertised window size)
If loss is detected - either by retransmission timeout (RTO), or the reception of duplicate ACKs, Onload will adopt a congestion avoidance algorithm to slow the transmission rate. In congestion avoidance the transmission window is halved from its current size - but will not be less than 2 × MSS. If congestion avoidance was triggered by an RTO timeout the Slow Start algorithm is again used to restore the transmit rate. If triggered by duplicate ACKs Onload employs a Fast Retransmit and Fast Recovery algorithm.
If Onload TCP receives three duplicate ACKs this indicates that a segment has been lost - rather than just received out of order and causes the immediate retransmission of the lost segment (Fast Retransmit). The continued reception of duplicate ACKs is an indication that traffic still flows within the network and Onload will follow Fast Retransmit with Fast Recovery.
During Fast Recovery Onload again resorts to the congestion avoidance (without Slow Start) algorithm with the congestion window size being halved from its present value.
Onload supports a number of environment variables that influence the behavior of the congestion window and recovery algorithms identified below. Refer to Parameter Reference:
- EF_TCP_INITIAL_CWND - sets the initial size (bytes) of congestion window
- EF_TCP_LOSS_MIN_CWND - sets the minimum size of the congestion window following loss.
- EF_CONG_AVOID_SCALE_BACK - slows down the rate at which the TCP congestion window is opened to help reduce loss in environments already suffering congestion and loss.