pf + altq + cbq(borrow) not borrowing from parent...

Peter fbsdq at peterk.org
Thu Mar 19 14:08:44 PDT 2009


>
>> Sorry, by dl I mean downloading large file from server to remote desktop
>> -
>> The server is uploading to desktop.
>> I want the children to use all the available bandwidth within the
>> 'extranet' queue - The child 'poshta' queue NEVER goes above using 34%,
>> even though all other queues have no services running on them and
>> 'poshta'
>> is set to borrow.  If I leave 'poshta' queue at 34% and set all others
>> to
>> 1%, the 'poshta' queue is still never pushing out more than 34% / 37KB.
>>
>> If I set it to '90%' it pushes out at ~90KB - wondering why it's not
>> borrowing when parent has unused bandwidth.
>>
>> ]Peter[
>>
>
> I'm pretty much out of ideas then. I'm running an almost identical setup
> (2 queues below root and 4 child queues in one of them) and it works for
> me. The only differences are that I borrow between ALL queues and root
> queue only has 1800Kb bandwidth. Don't know if my config can give you
> any new insights.
>
> altq on em1 cbq bandwidth 1800Kb queue {q_def, q_pri}
> queue q_def bandwidth 10% qlimit 200 cbq( borrow default )
> queue q_pri bandwidth 90% cbq( borrow ) {q_hv, q_p2p, q_p1, q_p2}
> queue  q_hv  bandwidth 10% priority 4 qlimit 200 cbq( borrow )
> queue  q_p2p bandwidth 10% priority 5 qlimit 200 cbq( borrow )
> queue  q_p1  bandwidth 20% priority 6 cbq( borrow )
> queue  q_p2  bandwidth 60% priority 7 cbq( borrow )
>
> Evidence of it working perfectly can be seen on second graph here:
> http://pp.dyndns.biz/pfstat/pfstat.html
>
upload at 20KB:
altq on fxp0 cbq bandwidth 100Mb queue {extranet}
   queue extranet bandwidth 886Kb {poshta}
        queue poshta bandwidth 186Kb cbq(borrow,default)

upload at 100KB:
altq on fxp0 cbq bandwidth 100Mb queue {extranet}
   queue extranet bandwidth 886Kb cbq(borrow) {poshta}
        queue poshta bandwidth 186Kb cbq(borrow,default)


This works, but defeats the purpose of having a queue for the DSL link
that is only 896Kb up as the queuing is no longer done at FreeBSD level. I
can set to root queue to 896 and all works as needed, but I should be able
to do several groups of queuing according to pf faq.

I've ran lots of tests in previous email to this list [
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=49104+0+current/freebsd-pf ]

The problem is that I want 'poshta' to borrow from parent [extranet], but
it doesn't, but for some weird reason when extranet is able to borrow,
poshta is able to borrow from extranet - Those are the only lines I have
for altq...

The parent queue shouldn't need borrow according to pf faq [might be due
to new version..?]:

------------------------------------------------
A queue can be configured to borrow bandwidth from its parent if the
parent has excess bandwidth available due to it not being used by the
other child queues. Consider a queueing setup like this:
    Root Queue (2Mbps)
        UserA (1Mbps)
            ssh (100Kbps)
            ftp (900Kbps, borrow)
        UserB (1Mbps)

If traffic in the ftp queue exceeds 900Kbps and traffic in the UserA queue
is less than 1Mbps (because the ssh queue is using less than its assigned
100Kbps), the ftp queue will borrow the excess bandwidth from UserA. In
this way the ftp queue is able to use more than its assigned bandwidth
when it faces overload. When the ssh queue increases its load, the
borrowed bandwidth will be returned.

------------------------------------------------

That is exactly what I want to do, but its not working as I think/man
pf.conf/FAQ says it should...

If you remove the borrow from 'q_pri' - do any of the children borrow from
each other?

Almost seems as if the children are trying to borrow from the root queue,
but not the parent/each other.


]Peter[
out of curiosity rebuilding world to -STABLE of today, and perhaps gonna
try -CURRENT.



More information about the freebsd-pf mailing list