1 new ACK: CWND = CWND + ------ CWND 1 3 duplicate ACKs: CWND = CWND - --- CWND 2 |
-------
1 / 3
B(p) = ----- \ / -----
RTT \/ 2bp
|
Assuming b = 1 (i.e., no delayed ACK), we have:
------
1 / 3
B(p) = ----- \ / ----
RTT \/ 2p
------
1 / 1.5
= ----- \ / ----
RTT \/ p
|
|
TCP analysis can already tell us that the TCP performance will be biased against long RTT connections
|
$64,000 Question:
|
|
W packets W+1 W+2
|<--------------->|<--------------->|<--------------->|
RTT RTT RTT
|
TCP throughput changes as follows:
W packets W+1 W+2
|<--------------->|<--------------->|<--------------->|
RTT RTT RTT
W W+1 W+2
TPut = ----- TPut = ----- TPut = -----
RTT RTT RTT
\ / \ /
\ / \ /
\ / \ /
1 1
Difference = ----- Difference = -----
RTT RTT
|
Conclusion:
|
|
Notice that:
|
c * RTT
new ACK: CWND = CWND + ---------
CWND
1
TD ACK: CWND = CWND - --- CWND
2
|
W packets W+c*RTT W+2*c*RTT
|<------------------>|<------------------>|<------------------>|
RTT RTT RTT
|
Resulting increase in TCP throughput:
W packets W+c*RTT W+2*c*RTT
|<------------------>|<------------------>|<------------------>|
RTT RTT RTT
W W+c*RTT W+2*c*RTT
TPut = ----- TPut = --------- TPut = -----------
RTT RTT RTT
\ / \ /
\ / \ /
\ / \ /
Difference = c Difference = c
|
c
Rate of increase in TCP throughput = ----- (packets per sec)
RTT
|
The rate of increase of TCP throughput is still dependent of RTT...
c * RTT2
new ACK: CWND = CWND + ---------
CWND
1
TD ACK: CWND = CWND - --- CWND
2
|
W packets W+c*RTT2 W+2*c*RTT2
|<------------------>|<------------------>|<------------------>|
RTT RTT RTT
|
Resulting increase in TCP throughput:
W packets W+c*RTT2 W+2*c*RTT2
|<------------------>|<------------------>|<------------------>|
RTT RTT RTT
W W+c*RTT2 W+2*c*RTT2
TPut = ----- TPut = --------- TPut = -----------
RTT RTT RTT
\ / \ /
\ / \ /
\ / \ /
Difference = c*RTT Difference = c*RTT
|
c*RTT
Rate of increase in TCP throughput = ------- = c (packets per sec)
RTT
|
Note:
|
|
(This code is executed after receiving a NEW ACK)
case 2:
/* This is the Constant-Rate increase algorithm
* from the 1991 paper by S. Floyd on "Connections
* with Multiple Congested Gateways".
* The window is increased by roughly
* wnd_const_*RTT^2 packets per round-trip time. */
f = (t_srtt_ >> T_SRTT_BITS) * tcp_tick_;
/* t_srtt_ = smoothed round-trip time */
/* T_SRTT_BITS = exponent of weight for
updating t_srtt_ */
/* tcp_tick_ = clock granularity, default 0.1 */
/* Net effect: f ~= RTT */
f *= f;
/* f = RTT^2 */
f *= wnd_const_;
/* wnd_const_ is the constant c in the above discussion */
/* f = c*RTT^2 */
f += fcnt_;
/* f = cumulative total */
/* ****************************************************************
Check if we have accumulated enough "credits" to increase cwnd_
**************************************************************** */
if (f > cwnd_)
{
++cwnd_; // ***** CWND = CWND + 1 when:
//
// #ACKS * (c*RTT^2) ~= CWND
// <=> #ACKS ~= CWND/(c*RTT^2)
fcnt_ = 0; /* Reset cumulative total */
}
else
{
fcnt_ = f; /* Keep cumulative total */
}
break;
|
|
set tcp [new Agent/TCP/Reno] $tcp set windowOption_ 2 ;# Make TCP Reno use "Constant Through increase rate" $tcp set windowConstant_ 3 ;# XXX - you can change the rate of increate if so desired |