[461] in linux-net channel archive
Re: [Project] Managing Available Bandwidth
daemon@ATHENA.MIT.EDU (Michael Shields)
Mon Jun 12 21:11:28 1995
From: shields@tembel.org (Michael Shields)
To: pete@dsw.com
Date: Tue, 13 Jun 1995 00:17:21 +0000 (GMT)
Cc: submit-linux-dev-net@ratatosk.yggdrasil.com
In-Reply-To: <3ri1k0$gql@vodka.intele.net> from "Pete" at Jun 12, 95 06:38:56 pm
** Hey, fix your tin setup!
> I'm working on some development now to allow Linux to act as a throttling
> router.
*Very* nice. Definitely fills a gap.
> - Committed Information Rate: at any time, traffic from specified
> addresses will be guaranteed bandwidth up to the CIR
> - Bursting: any connection can at any time use up any additional
> available bandwidth, as long as it doesn't infringe on someone else's CIR
> usage (the burst ceiling can be set arbitrarily)
"CIR" and "burst rate" are just ways of saying "minimum speed" and
"maximum speed". I suppose you'll be able to say something like
`ipthrottle ... 16k-128k'?
> - Time-sensitive parameters (for instance, CIR could be effective during
> business hours only for some customers, or CIR could be adjusted to
> different levels to allow for special events, etc)
I don't think this belongs in the kernel. If you need that functionality,
cron will give it to you.
> I'm starting out on a very low level right now. I'm trying to build a
> kernel that will limit all traffic to 56k. This is what I need to get
> some suggestions and help on.
Divide time into fixed-length blocks, maybe 100 ms - 1 s. Calculate how
many octets may be sent within that time. Every time data is sent,
subtract the length of the packet from this budget; drop the packet
if the budget is too small. Then, every 100 ms - 1 s, increase it by
(CIR + global_slack / global_bandwidth * (burst - CIR)), or some roughly
equivalent formula.
Do the same for received data. (If you want to be able to specify a
rate of n bps dynamically allocated between send and receive, well,
that just takes more work. But I'm not sure there's a demand for it.)
--
Shields.