Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2009 10:03:57 -0600 (MDT)
From:      "Peter" <fbsdq@peterk.org>
To:        "forn" <forn@ngs.ru>
Cc:        freebsd-pf@freebsd.org
Subject:   Re: more tests - pf + altq + cbq(borrow) not borrowing from parent  -  all LAN
Message-ID:  <62927.216.241.167.212.1237824237.squirrel@webmail.pknet.net>

next in thread | raw e-mail | index | archive | help
>
>    Hello. I'm having the same problem. My system is 7.1-Stable i386.
>    Here's entire pf.conf:
snip
>    With this config, speed of traffic in queue www5 never goes higher
>    than 250Kb.
>    But, if queue localq is set to borrow, as follows:
snip
>    then queue www5 is able to take the full bandwidth of 2Mb (which is
>    correct).
>    The physical link speed far surpasses 2Mb (actually, these are all
>    virtual machines set up for testing on the same server), so this can't
>    be a problem.

iH,
  Installed openbsd 4.4 [VM on ESX] - Still seeing the same problem -
Using one of the pf faq examples - still can't figure out what I'm
missing:

OpenBSD openbsd.my.domain 4.4 GENERIC#1021 i386

# grep -v "^#" /etc/pf.conf |grep -v ^$
set skip on lo0
altq on vic0 cbq bandwidth 5Mb queue { std, ssh, ftp }
queue std bandwidth 1Mb cbq(default)
queue ssh bandwidth 500Kb { ssh_login, ssh_bulk }
  queue ssh_login bandwidth 50% priority 4 cbq(borrow)
  queue ssh_bulk bandwidth 50% cbq(borrow)
queue ftp bandwidth 500Kb priority 3 cbq(borrow red)
pass in quick on vic0 proto tcp from any to port 222 flags S/SA keep state
queue ssh_login
pass in on vic0 proto tcp from any flags S/SA keep state
pass out on vic0 proto tcp from any to any flags S/SA keep state queue
ssh_login

pfctl -vvsq shows the 'ssh_login' queue is being used.
 doing sftp transfer over sshd on port 222 [just to isolate it]
traffic stays at ~250Kb, does not borrow

queue root_vic0 on vic0 bandwidth 5Mb priority 0 cbq( wrr root ) {std,
ssh, ftp}
  [ pkts:        799  bytes:     781987  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
  [ measured:    32.4 packets/s, 271.97Kb/s ]
queue  std on vic0 bandwidth 1Mb cbq( default )
  [ pkts:        115  bytes:      16978  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
  [ measured:     5.2 packets/s, 6.20Kb/s ]
queue  ssh on vic0 bandwidth 500Kb {ssh_login, ssh_bulk}
  [ 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   ssh_login on vic0 bandwidth 250Kb priority 4 cbq( borrow )
  [ pkts:        684  bytes:     765009  dropped pkts:      0 bytes:      0 ]
  [ qlength:  14/ 50  borrows:    508  suspends:     97 ]
  [ measured:    27.2 packets/s, 265.77Kb/s ]
queue   ssh_bulk on vic0 bandwidth 250Kb 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  ftp on vic0 bandwidth 500Kb priority 3 cbq( red 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 ]


Changing the parent 'ssh' queue to borrow:
# grep -v "^#" /etc/pf.conf |grep -v ^$
set skip on lo0
altq on vic0 cbq bandwidth 5Mb queue { std, ssh, ftp }
queue std bandwidth 1Mb cbq(default)
queue ssh bandwidth 500Kb cbq(borrow) { ssh_login, ssh_bulk }
  queue ssh_login bandwidth 50% priority 4 cbq(borrow)
  queue ssh_bulk bandwidth 50% cbq(borrow)
queue ftp bandwidth 500Kb priority 3 cbq(borrow red)
pass in quick on vic0 proto tcp from any to port 222 flags S/SA keep state
queue ssh_login
pass in on vic0 proto tcp from any flags S/SA keep state
pass out on vic0 proto tcp from any to any flags S/SA keep state queue
ssh_login

traffic pretty much uses up right near 5MB...

So not a FreeBSD issue it almost seems like it.
Have not tried OpenBSD mailing list  yet.
I'm misunderstanding how pf/cbq should work?

]Peter[




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62927.216.241.167.212.1237824237.squirrel>