On Wed, Jan 28, 2004 at 05:38:42PM +0700, Egbert Krook wrote:
> altq on $int_if cbq bandwidth 100% queue { net_int, www_int }
> queue net_int bandwidth 1.0Mb { std_int, it_int, boss_int }
> queue std_int cbq(default)
> queue it_int bandwidth 500Kb cbq(borrow)
> queue boss_int priority 3
> queue www_int cbq(red)
i might be off base here, but what if you used
altq on $int_if cbq(borrow) bandwidth 100% queue { net_int, www_int }
queue net_int bandwidth 1.0Mb cbq(borrow) { std_int, it_int, boss_int }
from the little i've played around with cbq, i recall having trouble getting
a child queue to borrow from its parent if the parent didn't explicitly
say 'borrow' in its cbq setting.
i don't know for sure if you need to define 'borrow' on the root class,
or even if i am correct at all that the parent needs to define borrow also,
but i do recall borrowing beginning to function after i did that to both.
looking at this one, from pf.conf(5):
queue std bandwidth 10% cbq(default)
queue http bandwidth 60% priority 2 cbq(borrow red) \
{ employees, developers }
queue developers bandwidth 75% cbq(borrow)
queue employees bandwidth 15%
queue mail bandwidth 10% priority 0 cbq(borrow ecn)
queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
queue ssh_interactive priority 7
queue ssh_bulk priority 0
it seems like the 'http' queue is specifying borrow as well, implying it
will borrow from the root class ( which != default class, afaik ).
> Another thing I've noticed is that when the boss's computer and the IT dept
> download from the Internet simultaneously the total bandwidth exceeds the 1
> Mbps limit that has been imposed on the net_int queue.
>
> queue root_fxp2 bandwidth 100Mb priority 0 cbq( wrr root ) {net_int, www_int}
> [ pkts: 7527 bytes: 11205187 dropped pkts: 0 bytes: 0 ]
> [ qlength: 0/ 50 borrows: 0 suspends: 0 ]
> [ measured: 124.6 packets/s, 1.50Mb/s ]
> queue net_int bandwidth 1Mb {std_int, it_int, boss_int}
> [ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
> [ qlength: 0/ 50 borrows: 0 suspends: 0 ]
> [ measured: 0.0 packets/s, 0 b/s ]
> queue std_int bandwidth 1Mb cbq( default )
> [ pkts: 2 bytes: 102 dropped pkts: 0 bytes: 0 ]
> [ qlength: 0/ 50 borrows: 0 suspends: 0 ]
> [ measured: 0.0 packets/s, 0 b/s ]
> queue it_int bandwidth 500Kb cbq( borrow )
> [ pkts: 2621 bytes: 3814188 dropped pkts: 0 bytes: 0 ]
> [ qlength: 13/ 50 borrows: 15 suspends: 1279 ]
> [ measured: 42.6 packets/s, 505.58Kb/s ]
> queue boss_int bandwidth 1Mb priority 3
> [ pkts: 4904 bytes: 7390897 dropped pkts: 0 bytes: 0 ]
> [ qlength: 11/ 50 borrows: 0 suspends: 1628 ]
> [ measured: 82.0 packets/s, 992.55Kb/s ]
> queue www_int bandwidth 100Mb cbq( red )
> [ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
> [ qlength: 0/ 50 borrows: 0 suspends: 0 ]
> [ measured: 0.0 packets/s, 0 b/s ]
it would seem as if they're really not limited by the bandwidth of their
parent, but rather are each just drawing off of the root class? again, i'm not
the expert... :/
do things change if you use percentages?
as in:
altq on $int_if cbq bandwidth 100% queue { net_int, www_int }
queue net_int bandwidth 1.0Mb { std_int, it_int, boss_int }
queue std_int bandwidth 100% cbq(default)
queue it_int bandwidth 50% cbq(borrow)
queue boss_int bandwidth 100% priority 3
queue www_int cbq(red)
that would seem to be equivalent to what you are doing... i don't know the
ramifications of two queues each allowed to use 100% of their parent's
bandwidth -- i suppose that it would become a "priority" fight when it got
used to capacity?
if you try:
altq on $int_if cbq bandwidth 100% queue { net_int, www_int }
queue net_int bandwidth 1.0Mb { std_int, it_int, boss_int }
queue std_int bandwidth 50% cbq(default)
queue it_int bandwidth 25% cbq(borrow)
queue boss_int bandwidth 50% priority 3
queue www_int cbq(red)
do things act sanely as they ought to, within the confines of those bandwidth
limits?
jared
--
[ openbsd 3.4 GENERIC ( jan 5 ) // i386 ]