as i know you need to specify in your parrent rule a borrow word. So
in anykind of parent rule or sub parent rule you need a borrow rule so
he can borrow from his parrent or his subrules can borrow from the
parrent rule.
something like this :
# First internal interface QoS
altq on $int_if1 cbq bandwidth 100Mb queue { lan_in, std_in }
queue lan_in bandwidth 90Mb cbq
queue std_in bandwidth 1900Kb cbq (borrow red) { ssh_im_in, dns_in,
users_in }
queue ssh_im_in bandwidth 128Kb cbq
queue dns_in bandwidth 128Kb cbq (default)
queue users_in bandwidth 1644Kb cbq (borrow red) \
{ user1_in, user2_in, user3_in, user4_in, user5_in }
queue user1_in bandwidth $bwsp cbq (borrow)
queue user2_in bandwidth $bwsp cbq (borrow)
queue user3_in bandwidth $bwsp cbq (borrow)
queue user4_in bandwidth $bwsp cbq (borrow)
queue user5_in bandwidth $bwsp cbq (borrow)
On 7/21/06, Michal Soltys <[EMAIL PROTECTED]> wrote:
I noticed, that for some reason, subequeues have hard time
borrowing unless the parent queue can borrow itself.
For example, consider following setup (only important parts):
altq on $if_100 cbq bandwidth 100Mb queue { if100_www,if100_mail, \
if100_misc, if100_ftp, if100_pri, if100_extbulk, if100_ack }
queue if100_misc on $if_100 bandwidth 2.8Mb cbq(default borrow)
queue if100_www on $if_100 bandwidth 25Mb cbq \
{if100_www_int, if100_www_sqd}
queue if100_www_int on $if_100 bandwidth 5Mb cbq(borrow)
queue if100_www_sqd on $if_100 bandwidth 20Mb cbq(borrow)
queue if100_mail on $if_100 bandwidth 15Mb cbq(borrow)
#...remaining queues...
#and following rule:
pass in on $if_100 inet proto tcp from any to $srv_100 port www
flags S/SAFR keep state queue (if100_www_int, if100_ack)
In this scenario (note - no borrow in parent if100_www),
I got following results:
queue root_fxp0 bandwidth 100Mb priority 0 cbq( wrr root ) {if100_misc,
if100_www, if100_mail, if100_ftp, if100_pri, if100_extbulk, if100_ack}
[ pkts: 24451 bytes: 34995648 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 516.5 packets/s, 5.91Mb/s ]
queue if100_www bandwidth 25Mb {if100_www_int, if100_www_sqd}
[ 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 if100_www_int bandwidth 5Mb cbq( borrow )
[ pkts: 24448 bytes: 34995380 dropped pkts: 0 bytes: 0 ]
[ qlength: 11/ 50 borrows: 18713 suspends: 1357 ]
[ measured: 516.5 packets/s, 5.91Mb/s ]
queue if100_www_sqd bandwidth 20Mb cbq( borrow )
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
Now, if I add (borrow) to if100_www queue:
queue if100_www on $if_100 bandwidth 25Mb cbq(borrow) \
{if100_www_int, if100_www_sqd}
the results:
queue root_fxp0 bandwidth 100Mb priority 0 cbq( wrr root ) {if100_misc,
if100_www, if100_mail, if100_ftp, if100_pri, if100_extbulk, if100_ack}
[ pkts: 86969 bytes: 124483434 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 6563.2 packets/s, 75.16Mb/s ]
queue if100_www bandwidth 25Mb cbq( borrow ) {if100_www_int, if100_www_sqd}
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 86678 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue if100_www_int bandwidth 5Mb cbq( borrow )
[ pkts: 86967 bytes: 124483226 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 86880 suspends: 0 ]
[ measured: 6563.2 packets/s, 75.16Mb/s ]
queue if100_www_sqd bandwidth 20Mb cbq( borrow )
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
No suspends, almost identical borrows, and quite a difference in bandwidth.
It somehow looks, that parent queue prohibits borrowing, unless it can borrow
itself from the root queue.
Is it intended (or maybe a bug or misconfiguration on my side) ? I was under
impression (including pf faq examples) that if a subqueue has the borrow
attribute, it can use extra bw from parent queue, regardless if the parent
can or cannot borrow itself.
--
Key fingerprint = 9864 E575 E207 FB90 44C8 26A2 0167 E57E 66ED 0F1D