Sure, I pretty much agree with your analysis.  The old code calculated
an average lifespan for subfacets over the entire life time of the
switch.  I suppose I would argue that the old metric isn't
particularly useful.  Who cares if 2 days ago most of the subfacets
lasted 300 milliseconds?  When I'm looking at the switch, I want to
know at this moment (give or take a minute), are the flows we're
looking at short-lived or long lived.

At any rate, the commit message should have done a better job of
pointing the change out.  I didn't really design the feature in the
first place, so perhaps the original behavior is what was intended. I
dont' feel all that strongly about it to be honest.  Just seemed a bit
weird to me.  Perhaps Justin will have an opinion since he put in the
original feature request?

Ethan

On Thu, May 30, 2013 at 7:38 PM, Ben Pfaff <b...@nicira.com> wrote:
> On Thu, May 30, 2013 at 02:45:12PM -0700, Ethan Jackson wrote:
>> Along with some minor minor cleanups, this patch simplifies the
>> calculation of the average subfacet count, and average subfacet
>> lifespan.  They are both calculated as exponentially weighted
>> moving averages updated immediately after statistics are pulled
>> from the datapath.  This both simplifies the code, and makes the
>> statistics produced more useful.  Specifically, with the average
>> total subfacet lifespan, subfacets which are still in the datapath
>> now count towards that average.
>
> I think (without really looking at it) that the previous code for
> average subfacet lifespan calculated a genuine average over every
> subfacet that ever existed.  The new version weights currently
> existing subfacets the highest (but also gives them some additional
> credit for all the time they existed previously--is that kosher?).
> Subfacets that have expired receive exponentially decaying weight, so
> that a subfacet that disappeared 10 seconds ago essentially disappears
> from the average too.  That's a pretty different (and much
> shorter-term) statistic.
>
> If you want to include subfacets currently in the datapath, then you
> could fold those in with a loop similar to the one that you added in
> this patch.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to