TCP New Reno congestion window behavior in slow start phase

489 views
Skip to first unread message

Siddharth

unread,
Feb 1, 2012, 5:44:47 PM2/1/12
to ns-3-users, e...@ittc.ku.edu
Hello,

I am currently working on a script that uses TCP NewReno.

I find that in the slow start phase, until congestion avoidance, the
congestion window only increases by the segment size for every new ACK
received. This basically means that the congestion window increases
linearly with an increase of the segment size seen at every new
ACK.This was seen while running the Our Bulk Application and running
TCP NewReno and observing the logs.

But my understanding is that the congestion window should experience
an exponential increase with the congestion window doubling every RTT.
This behavior is also given in the RFC 2001 document that has been
referenced in the NewReno code in src/internet/model. In paragraph 4
of RFC 2001 Section 1, the exponential growth has been mentioned. But
I am not able to find the corresponding behavior in the code.

The particular subset of New Reno code of our interest in the New
Ack() method and is given below:

if (m_cWnd < m_ssThresh)
{ // Slow start mode, add one segSize to cWnd. Default m_ssThresh
is 65535. (RFC2001, sec.1)
m_cWnd += m_segmentSize;
NS_LOG_INFO ("In SlowStart, updated to cwnd " << m_cWnd << "
ssthresh " << m_ssThresh);
}

Am I missing out something? Any help greatly appreciated.

Thanks,
Siddharth

Tommaso Pecorella

unread,
Feb 1, 2012, 7:22:05 PM2/1/12
to ns-3-users
Hi,

The answer is: Fibonacci numbers. Or rabbit's population growth, as
you prefer.

You send a packet, you receive an ack. Now your window is 2, so you
send 2 packets and you receive 2 asks. Now your window is 4, you send
4 packets and receive 4 asks. Now your window is 8... shall I keep
on ?

Cheers,

T.

Juan Pablo Poujade

unread,
Feb 1, 2012, 8:12:14 PM2/1/12
to ns-3-...@googlegroups.com
It is supposed that if you've introduced N packets in the network then you'll receive N ack's within the next RTT. So for the next RTT you'll have a window of 2N packets lenght. Therefore your window will be duplicated every RTT (exponential growth with base 2).
 
My 2 cents.
 
Juan Pablo Poujade.

2012/2/1 Tommaso Pecorella <tomm...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.


Siddharth

unread,
Feb 1, 2012, 9:55:19 PM2/1/12
to ns-3-users
I understand the theory of the exponential growth during the slow
start phase. But what I do not understand is how I would be able to
see it through the NewReno logs.

A snapshot of the logs are given below. Please notice the change in
the cwnd. Initially it is at 1460. then changes to 2920 in the first
block, 4380 in the second block, 5840 in the third block and so on.
Basically a change of 1460 (the segment size) was observed until cwnd
reaches the ssthresh (slow start threshold).

0.0186734s 0.0186734 [node 2] TcpNewReno:NewAck(): TcpNewReno
receieved ACK for seq 1461 cwnd 1460 ssthresh 65535
0.0186734s 0.0186734 [node 2] TcpNewReno:NewAck(): In SlowStart,
updated to cwnd 2920 ssthresh 65535

0.0315495s 0.0315495 [node 2] TcpNewReno:NewAck(): TcpNewReno
receieved ACK for seq 4381 cwnd 2920 ssthresh 65535
0.0315495s 0.0315495 [node 2] TcpNewReno:NewAck(): In SlowStart,
updated to cwnd 4380 ssthresh 65535

0.0444256s 0.0444256 [node 2] TcpNewReno:NewAck(): TcpNewReno
receieved ACK for seq 7301 cwnd 4380 ssthresh 65535
0.0444256s 0.0444256 [node 2] TcpNewReno:NewAck(): In SlowStart,
updated to cwnd 5840 ssthresh 65535

0.0548984s 0.0548984 [node 2] TcpNewReno:NewAck(): TcpNewReno
receieved ACK for seq 10221 cwnd 5840 ssthresh 65535
0.0548984s 0.0548984 [node 2] TcpNewReno:NewAck(): In SlowStart,
updated to cwnd 7300 ssthresh 65535

On Feb 1, 7:12 pm, Juan Pablo Poujade <jppouj...@gmail.com> wrote:
> It is supposed that if you've introduced N packets in the network then
> you'll receive N ack's within the next RTT. So for the next RTT you'll have
> a window of 2N packets lenght. Therefore your window will be duplicated
> every RTT (exponential growth with base 2).
>
> My 2 cents.
>
> Juan Pablo Poujade.
>
> 2012/2/1 Tommaso Pecorella <tommy...@gmail.com>

Siddharth

unread,
Feb 3, 2012, 10:46:52 AM2/3/12
to ns-3-...@googlegroups.com
still seeking some help on this issue.

Thanks,
Siddharth

Siddharth

unread,
Feb 20, 2012, 12:33:24 AM2/20/12
to ns-3-users
just documenting the end of this issue.

The behavior of TCP New Reno is as should be.

I had made an error in looking at the change in congestion window in
trying to look at the increase at every ACK, rather the increase
should be looked at across time.

Thanks Tommaso and Juan for helping out.

Cheers,
Siddharth
Reply all
Reply to author
Forward
0 new messages