Wes Santee wrote:
> [snip]
> The setup from pf.conf is this:
>
> altq on $ext_if bandwidth 54Mb cbq queue { internal, external }
> queue internal bandwidth 53104Kb priority 7 cbq(borrow)
> queue external bandwidth 896Kb priority 4 cbq { highq, defaultq, lowq }
> queue highq bandwidth 40% priority 3 cbq(borrow)
> queue defaultq bandwidth 40% priority 2 cbq(default borrow)
> queue lowq bandwidth 20% priority 1 qlimit 300 cbq(borrow)
>
> The internal queue is for wireless traffic coming from and going to the
> internal network. The external queue (and its children) are for traffic
> going upstream to my ISP. The "external" queue is set to my max
> upstream bandwidth to my ISP, so it can't borrow from the root queue.
> All the child queue's under "external" can (and should) borrow against
> the available upstream bandwidth amount if available.
>
> The problem is that packets in lowq are filling up the queue, even
> though there is plenty of bandwidth available to borrow from the parent
> queue.
Here's some additional details that may help. Note in my original
e-mail I said that the "external" queue cannot borrow from the root
queue, as I can't transmit data any faster than 896Kbit/sec to my ISP.
However, if I change the external queue to enable borrowing, ala:
altq on $ext_if bandwidth 54Mb cbq queue { internal, external }
queue internal bandwidth 53104Kb priority 7 cbq(borrow)
queue external bandwidth 896Kb priority 4 cbq(borrow) { highq, defaultq,
lowq }
queue highq bandwidth 40% priority 3 cbq(borrow)
queue defaultq bandwidth 40% priority 2 cbq(default borrow)
queue lowq bandwidth 20% priority 1 cbq(borrow)
things start painting a very different picture (note I eliminated the
qlimit keyword also for testing purposes). "pfctl -vvsqueue" now gives us:
queue internal bandwidth 53.10Mb priority 7 qlimit 200 cbq( borrow )
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/200 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue external bandwidth 896Kb priority 4 cbq( borrow ) {highq,
defaultq, lowq}
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 1285 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue highq bandwidth 358.40Kb priority 3 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 ]
queue defaultq bandwidth 358.40Kb priority 2 cbq( borrow default )
[ pkts: 2781 bytes: 1226812 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 180 suspends: 0 ]
[ measured: 17.5 packets/s, 66.61Kb/s ]
queue lowq bandwidth 179.20Kb cbq( borrow )
[ pkts: 5189 bytes: 6068440 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 4341 suspends: 0 ]
[ measured: 40.9 packets/s, 398.70Kb/s ]
Now the queue "lowq" is borrowing heavily from its parent queue
(external) and the queue is not backing up even at the default of 50
elements.
The strange thing here is that the queue "external" now shows that it is
borrowing from its parent (the root queue), although the amount of
bandwidth going through its queue is never getting close to its max of
896Kbit (about the highest I've seen it go is ~700Kbit/sec).
Can anyone explain what is going on? Why won't child queues enabled for
borrowing not fully borrow from their parent if the parent is configured
not to borrow from its parent?
Cheers,
-Wes