[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] ns treatment of TCP's initial window, with delayed ACKS



Hi all,

I would like to use the increased TCP initial window (IW) as indicated by RFC
2581 (less or equal to 2 SMSS). I thought that was trivial, i.e. simply say

Agent/TCP set windowInit_ 2

This gives the desired result but not for long. The congestion window (cwnd)
does not seem to follow an exponential growth (we're in slow start). I'm
monitoring the cwnd of one of the senders and I get the following:

Time  cwnd (in SMSS)
(s)
0.000 2.0
0.001 2.0
0.002 2.0
<...>
0.136 2.0
0.137 2.0
0.138 2.0
0.139 2.5
0.140 2.5
<...>
0.214 2.5
0.215 2.5
0.216 2.9
0.217 2.9
0.218 2.9
<...>
0.291 2.9
0.292 2.9
0.293 2.9
0.294 3.2
0.295 3.2

The ns trace file shows the following

r 0.060187 6 7 ack 40 C------ 1 0.0 7.0 1 10
r 0.138053 6 7 ack 40 ------- 1 0.0 7.0 3 23
r 0.21592 6 7 ack 40 ------- 1 0.0 7.0 5 38
r 0.293787 6 7 ack 40 ------- 1 0.0 7.0 7 53
<...>

Which means that there is no increase for cwnd for the first delayed ACK, and
that the second, third, and so on (delayed) ACKs increase the sender's cwnd by
a fraction of the cwnd -- not a SMSS. This is correct behavior according to
RFC 2581 (p. 3, "During slow start, a TCP increments cwnd by at most SMSS
bytes for each ACK received that acknowledges new data."), however I would
expect to increase cwnd by 1 SMSS since we are evidently in slow start.

Moreover, the ssthresh collapses upon the receipt of the delayed ACK

0.059 44
0.060 44
0.061 2
0.062 2
0.063 2

(which explains why we proceed with congestion avoidance)

During this time there are no drops (the first drop happens later)

d 3.232196 6 5 tcp 1460 ------N 1 7.0 0.0 103 666
d 3.255497 6 5 tcp 1460 ------N 3 7.2 2.0 88 672
d 3.257833 6 5 tcp 1460 ------N 3 7.2 2.0 90 674
<...>

Also, if delayed ACKs are used, but IW is set to 1 SMSS slow start continues
as expected.

I use ns 2.1b7a, and have a TCP/Reno sender and TCPSink/DelAck receivers

I'm afraid that there is a bug somewhere (either in my script or tcp.cc),
or I'm missing something. Your help will be much appreciated.

(As an aside, TcpAgent::initial_window() implements the behavior of RFC 2414
(experimental) but not RFC 2581. Any particular reason?)

Best regards,

Kostas

---
Kostas Pentikousis @ CS SUNY Stony Brook @ http://www.cs.sunysb.edu/~kostas