On Fri, Sep 06, 2002 at 07:09:13PM +0800, Fabio Mascio wrote:
> Hi all,
> I think ethereal is a great program and I use it especially for watching and optimizing the speed of my tcp connections in my wan.
> I'm sorry if I made a mistake but
> looking at the throughput graph code I think that the first time that
> "i > g->s.tput.nsegs" the value of "oldest->data" should be zero because the first packet is just the reference to calculate the delta time.
> Instead in this way the first time you enter in this condition, you reduce the sum but not the delta time.
>
> if (i>g->s.tput.nsegs) {
> sum -= oldest->data;
> oldest=oldest->next;
> }
Hi Fabio,
I'm not sure whether I understand your description correctly.
First, let me describe briefly the purpose of the code in question.
The idea is that for every TCP segment, the time of its arrival is taken
and a point is plotted to the graph that corresponds to throughput
computed over last s.tput.nsegs (actually 20, IIRC) segments. In other
words, last 20 segments (including this one) are taken, their data is
summarized and divided by the time during which these 20 segments
arrived. I think the current code is correct with respect to this
design because the delta time is recomputed at the top of the next
iteration of the loop.
However, IMHO the design itself is dubious because the first 20 data
points of the graph have slightly different semantics that the rest of
the graph and because it often fails to produce a useful graph (data
points can end up too scattered for an operator to be able to see a
trend). If you are interested in measuring throughput of TCP
connections I can send you a rather largish patch which implements a
*greatly* enhanced thoughput graphing including EWMA-ized algorithm and
a GUI to set various parameters for the graph computation.
pvl