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

[ns] Incorrect TCP stats for web traffic model



When running the web traffic model, I noticed some of the per-flow
TCP statistics appeared incorrect when compared against
the packet trace. Specifically information such as the 
number of data packets/bytes in a flow seemed higher than
the actual amount of traffic generated by the flow.

After further investigation, I seemed to correlate the
inaccuracy with the recycling or reuse of a TCP agent.
Having 2 or 3 sessions with a single server, single client
and 2 or 3 pages seemed sufficient to reproduce the 
problem consistently.

I then noticed that webtraf.tcl code calls reset() in 
tcp.cc! This function reinitializes many of the variables 
used by the TCP code. However, the variables reporting 
the incorrect results were not reinitialized in the function.
This includes:

ndatapack_
ndatabytes_
nrexmitbytes_
nrexmit_

Setting the above variables to 0 in reset() seemed
to fix the problem. I haven't noticed any other inaccuracies
since then. 

Unless they were left out intentionally, it may be a 
good idea to include the above variables in tcp.cc's
reset() initialization.

--
Nabil Seddigh
[email protected]