[e2e] Question about RFC 2581
Agarwal, Anil
Anil.Agarwal at viasat.com
Tue Jan 11 11:08:28 PST 2005
Michael Welzl wrote -
RFC 2581 states:
One formula commonly used to update
cwnd during congestion avoidance is given in equation 2:
cwnd += SMSS*SMSS/cwnd (2)
This adjustment is executed on every incoming non-duplicate ACK.
Equation (2) provides an acceptable approximation to the underlying
principle of increasing cwnd by 1 full-sized segment per RTT. (Note
that for a connection in which the receiver acknowledges every data
segment, (2) proves slightly more aggressive than 1 segment per RTT,
and for a receiver acknowledging every-other packet, (2) is less
aggressive.)
Actually, for a connection in which the receiver acknowledges every data
segment,
(2) is slightly **less** aggressive than 1 segment per RTT.
Take an example of MSS = 1000 bytes over a link with delay >> packet
transmission time.
At time 0, cwnd = 1000.
Case 1. cwnd is increased by 1 segment every RTT
After 1 RTT, cwnd = 1000 + 1000 = 2000
After 2 RTTs, cwnd = 2000 + 1000 = 3000
After 3 RTTs, cwnd = 3000 + 1000 = 4000
Case 2. cwnd is increased using (2), and only MSS sized segments are sent
After 1 RTT, cwnd = 1000 + (1000 * 1000) / 1000 = 2000
In the second RTT, 2 segments are sent and acknowledged.
After the first ACK, cwnd = (2000 + (1000 * 1000) / 2000) = 2500
After the second ACK, cwnd = (2500 + (1000 * 1000) / 2500) = 2900
In the third RTT, 2 segments are sent and acknowledged.
After the first ACK, cwnd = (2900 + (1000 * 1000) / 2900) = 3244
After the second ACK, cwnd = (3244 + (1000 * 1000) / 3244) = 3552
Note that cwnd is smaller than the value in Case 1 and
remains so subsequently.
Case 3. cwnd is increased using (2), and partial segments are sent
After 1 RTT, cwnd = 1000 + (1000 * 1000) / 1000 = 2000
In the second RTT, 2 segments are sent and acknowledged.
After the first ACK, cwnd = (2000 + (1000 * 1000) / 2000) = 2500
After the second ACK, cwnd = (2500 + (1000 * 1000) / 2500) = 2900
In the third RTT, 3 segments are sent and acknowledged
(the last segment is of size 900).
After the first ACK, cwnd = (2900 + (1000 * 1000) / 2900) =
3244
After the second ACK, cwnd = (3244 + (1000 * 1000) / 3244) =
3552
After the third ACK, cwnd = (3552 + (1000 * 1000) / 3552) =
3833
Note that cwnd is smaller than the value in Case 1,
but larger than in Case 2, and remains so on subsequently.
As Mark suggests, "congestion avoidance should be implemented using
byte counting and that 1 SMSS should be added to cwnd after cwnd bytes
have been ACKed. That is allowed in the current RFC".
Would the following equation be a reasonable alternative way to do this -
cwnd += bytes_acked * SMSS / cwnd (3)
or
cwnd += bytes_acked / 2 * SMSS / cwnd (4)
(4) tries to capture the effect of delayed acknowledgements.
The above is executed for every ack packet, and does not require
any additional state to be maintained.
For comparison, (3) with MSS sized segments, and 2 ACKs per segment,
gives cwnd after RTT 3 = 3415.
Anil
Anil.Agarwal at viasat.com
More information about the end2end-interest
mailing list