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

Re: [ns] Delay, jitter, throughtput



On Tue, 9 May 2000 [email protected] wrote:

> |How can I calculate the throughtput of a source, the end-to-end delay or
> |a packet delat, the jitter.....
> |Can anyone help me???
>  
>   For throughput calculation, if you are using a TCP source, you
>   can use the following code in your finish() routine :
>  
>                 set nbytes [$tcp_source set ack_]
>                 set time [expr $stop_time - $start_time]
>                 set thruput [expr $nbytes * $pktsize * 8 / $time ]
>                 puts " throughput = $thruput"
>  
>   For a CBR  source, you need to see the trace and get the  
>   number of packets that have made it to the destination, and use the
>   above calc. Or you can modify the Sink to do the same, and also
>   for the delay/jitter.

This assumes that all acks have been received by the time finish() is
called, that e.g. the last ack hasn't been dropped in the network so
the sender's window positions match the receiver's, and that the
packet size remains constant throughout - okay, that's a safe
assumption at the moment (if you're using FullTcp, you adjust for
header size. If not, you start fudging).

Fiddling with TCPSink as previously suggested eliminates some of these
caveats.


>   For a CBR  source, you need to see the trace and get the
>   number of packets that have made it to the destination, and use the
>   above calc. Or you can modify the Sink to do the same, and also
>   for the delay/jitter.

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>