[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] confused about the throughput measurement for the TCPtraffic.
On Mon, 15 Oct 2001, liu yong wrote:
> I got a problem about the throughput measurement for the TCP traffic.The measurement result is greater than the sending rate.I know it is impossible to set the sending rate of the TCP traffic.
> According to the suggestion I found in ns-mailing list, I attached a CBR source as the application of a TCP agent.Then I set the sending rate of CBR as 27kbps and the packetsize is 1000byte,but I found the measurement result is 122kbps.
> when I set the sending rate of CBR as 90kbps, packetsize is 250,the measurement is 127kbps.Since I need to get such measurement result in C++, so I added a counter in the
> TcpSink::recv(packet * pkt, Handler*)
> {
> pkts_arrival++;
> }
> ,then I used a timer to caculate the throughout when the timer expires at fixed interval.
> I have used the same code in the udp::recv(packet *pkt) to get the
> throughput of UDP traffic,the result is ok(same with what I have
> set).
You're counting every packet as received, even though TCP retransmits
segments.
read
http://www.isi.edu/nsnam/archive/ns-users/webarch/2000/msg00059.html
bug report - TCPSink/*, packetSize_, headers and recvBytes()
me, Jan 2000.
L.
<L.Wood@surrey.ac.uk>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>