Re: [PATCH] net: implement emergency route cache rebulds when gc_elasticity is exceeded

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Neil Horman
Date: Monday, October 6, 2008 - 3:52 pm

On Mon, Oct 06, 2008 at 11:21:38PM +0200, Eric Dumazet wrote:
I don't either, that was my concern :).

Yes, and the average worked out properly, which is why I was concerned.

If you take an even simpler case, like you state above (I admit I miseed the
/300 part of the sample, but no matter).

samples = 26214
Assume each sample has a chain length of 1

sum = 26214 * (1 << 3) = 209712
sum2 = sum * sum = s09712 * 209712 = 43979122944
avg = sum / samples = 209712 / 26214 = 8 (correct)
sd = sqrt(sum2 / samples - avg*avg) = sqrt(43979122944/26214 - 64) = 1295
sd >> 3 = 1295.23 >> 3 = 161


Clearly, given the assumption that every chain in the sample set has 1 entry,
giving us an average of one, the traditional method of computing standard
deviation should have yielded an sd of 0 exactly, since every sample was
precisely the average. However, the math above gives us something significantly
larger.  I'm hoping I missed something, but I don't think I have.  

Neil


-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] net: implement emergency route cache rebulds w ..., Neil Horman, (Mon Oct 6, 3:52 pm)
Re: [PATCH] net: implement emergency route cache rebulds w ..., Stephen Hemminger, (Thu Oct 16, 10:03 pm)
Re: [PATCH] net: implement emergency route cache rebulds w ..., Stephen Hemminger, (Thu Oct 16, 10:06 pm)