Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Nov 2000 10:18:28 -0700
From:      Warner Losh <imp@village.org>
To:        net@freebsd.org
Subject:   Traffic throttling
Message-ID:  <200011011718.KAA16816@harmony.village.org>

next in thread | raw e-mail | index | archive | help

Greetings net list.  I hope this is the right place to ask.

Our upstream ISP charges us based on how much bandwidth we use at the
95th percentile.  We want to limit the bandwidth that we use so that
we consistantly come in at a certain level.  One trivial way to do
this would be:
	ipfw pipe 1 config bw 32Kbit/s
which would guarantee, more or less, that we never exceed 32kpbs.

However, the 95th percentile measurement that our isp does is the 95th 
percentile of the 5 minute averages of usage.  there's no reason we
couldn't use 200kbps of our pipe for 1 minute to download a port
distribution and let the other 4 minutes go relatively idle.  For that 
matter, 5% of the 5 minute time slices is 432 of them.  These samples
are eliminated from consideration, so it doesn't matter what they
are.  Last night I used 20 of them to update all my source trees from
since before BSDcon via cvsup and rsync (depending on the
project). :-)

After looking at the logs for a few weeks, I think that even a simple
	ipfw pipe 1 config bw 64Kbit/s
would cover our butts, but again we're left with the desire to push
the envelope further than this.

Now to my question, what's the best way to throttle things based on
the above rules so that each month we are guarnateed (or nearly so) to 
have our 95th percentile of usage be below a certain level.  I know
the answer will likely involve thinks like "divert" and "write a
deamon to" but if anybody had any suggestions for how to proceed, I'd
love that.  Maybe someone has already written such a tool, but I fear
I'll need to write it.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011011718.KAA16816>