[ns] slow start an congestion wondow question

Sunesh Kumra kumra@cc.hut.fi
Thu Apr 18 05:45:25 2002


Hi All,

I am trying to use the RFC793edu TCP agent and trace it's congestion window and

throughput under 2 cases 
a) when using slow start
b) when using additive increase

the problem is that I am not getting the expected results … I would expect that

the throughput would increase when I use slow start and also that the 
congestion window builds up much faster in case of slow start ... but both 
things do not happen ... the throughput decreases !! and CW remains the same. 
Isn't that what should happen ? 

I have attached the section of the code where I am initializing the Agent :

# create a TCP-RFC793edu connection
set tcp1 [$nssim create-connection TCP/RFC793edu $n0 TCPSink $n2 1]
$tcp1 set fid_ 1
$tcp1 set window_ $maxwnd
$tcp1 set rtxcur_init_ $initialtimeout
$tcp1 set add793slowstart_ true
#$tcp1 set add793additiveinc_ true
$tcp1 set packet_size_ $mpktsize
$nssim at 0.0 "$tcp1 set ssthresh_ 1"

I just uncomment the line for additive increase and comment the line for 
slowstart in other case.

and this is how I record the CW window :
proc record {} {
    global nssim tcp1 winfile maxwnd
    #Sampling interval
    set time 0.1
 
    #WINDOW FOR TCP1
    #Read congestion window of tcp1
    set curr_cwnd [$tcp1 set cwnd_]
    #Compare the value of cwnd to maxwnd to decide actual sending window
    if { $curr_cwnd < $maxwnd } {
        set curr_wnd $curr_cwnd
    } else {
    set curr_wnd $maxwnd
    }
    #current time
    set now [$nssim now]
    # write the file as window vs time trace
    puts $winfile "$now $curr_wnd"
    #re-schedule procedure
    $nssim at [expr $now+$time] "record"
}

can anyone locate a mistake ? Thanks for your help in advance.

Regards,
sune.sh