Borrow in CBQ doesn't work

Marcelo Celleri marceloc at espoltel.net
Thu Feb 8 00:08:40 UTC 2007


Hi everyone,

I'm working with ALTQ, but I realize that the borrow option in cbq
queues doesn't work at least like the manual says "A child class can
borrow bandwidth from its parent class as long as excess bandwidth is
available", I isolated 2 PC's (pc, laptop) and made some tests with this
configuration:


altq on $int_if bandwidth 100Mb cbq queue { vip, adm_fin, it_cac, test }
queue vip bandwidth 50Mb cbq(default)

queue test bandwidth 192Kb cbq { pc, laptop }
  queue pc bandwidth 128Kb cbq (borrow, ecn)
  queue laptop bandwidth 64Kb priority 7 cbq (borrow, ecn)

queue adm_fin bandwidth 384Kb cbq
queue it_cac  bandwidth 512Kb cbq

pass out quick on $int_if from any to 172.26.5.42 keep state queue
laptop
pass out quick on $int_if from any to 172.26.5.40 keep state queue pc

The shaping was good, when this 2 machines were receiving traffic at the
same time, pc got 128Kbps and laptop got 64Kbps, but I was expecting
that when I turn off one of the PCs the other had all the bandwidth
associated with the queue (192Kb) but the results wasn't what I wanted.
 
When I used only the "pc" the maximum bandwidth was 140Kbps, and with
the laptop the maximum was 80Kbps, for worst, these weren't stables
values, then I made some changes like taking off the ecn parameter or
changing priorities, then I got more stable values but almost the same
maximums.

Then I test the hfsc queues, they work pretty well in these cases, but I
wanted to change an altq configuration with a lot of queues and
sub-queues and my server gave me this error:

pfctl: DIOCADDALTQ: Cannot allocate memory.

Apparently it was a lot work to process for my server :(

I would like to find the way to making work this "borrow" option, please
tell me if someone of you had the same problem or if my configuration
it's wrong. 

PD: here is my kernel config for ALTQ:

options         ALTQ
options         ALTQ_CBQ        # Class Bases Queueing
options         ALTQ_RED        # Random Early Detection
options         ALTQ_RIO        # RED In/Out
options         ALTQ_HFSC       # Hierarchical Packet Scheduler
options         ALTQ_PRIQ       # Priority Queueing


Thanks a Lot,

 
----------------------------------
       Marcelo Célleri M.
            Jefe IP
         ESPOLTEL S.A.
   PBX 593 04 2514477 Ext. 114
----------------------------------



More information about the freebsd-pf mailing list