I was designing some traffic rules for a server, and a thought came to my
head. All the examples of using tc to design traffic priorities seem to
have either fully fixed queue sizes, (port 80 gets 3 mbits, 22, 25 & 143
get 1.5 mbit, everyone else gets 0.5 mbit), or the have one queue having
the ability to borrow unused capacity from another queue (i.e. port 80 gets
3 mbits, 22, 25 & 143 get at least 1 mbit, but if port 80's queue has
unused capacity at the moment, they can go up to 4.5 mbits, and then loose
that when needed by port 80 traffic). But is there a way to set the queues
to borrow from each other?



What I'm looking for is something like this (and this is very simplified,
but gets the point across):

total bandwidth available: 5 mbits

port 80: minimum 0.1kbits per sec, max 5 mbits if no port 22/143 traffic.
Port 22/143 can steal up to 1mbit of max

ports 22/25/143: minimum 0.1kbits per sec, max 5 mbits if no port 80
traffic. Port 80 can steal up to 3.5 of mbits of max



I'm sure it's doable, probably with the priority system somehow. But with
all the examples I've seen, it seems to me that if I tried to set that up,
then port 80 could take up to the entire 5 mbits, leaving port 22 and 143
traffic starved.



I don't want any restrictions on either side, UNLESS there is traffic on
both sides. Then restrict to the 3.5mbit on port 80 and the 1mbit on port
22/25/143. However, if for example the traffic on ports 22, 25, and 143 is
only 120k, then let port 80 steal the other 880k.



I hope this is clear. Is there a way to accomplish this? Perhaps I'm
misunderstanding things and tc would accomplish this automatically if I set
the queues with the 1 & 3.5 mbit values?



Any help is greatly appreciated, of course.



Thanks!
--- Dan

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to