Thank you! (and a critique request)

2003-02-09 Thread Jason Dixon
Just wanted to send out a quick thank you to all the PF developers. 
I've just completed a "simple" altq setup on a 3.2 -stable box to cap a
user's outgoing bandwidth.  Tested with the limited IP, and with an IP
in the default class, works great.  I'm looking forward to upgrading
these boxes later on to 3.3 -release with the new pf-merged altq code. 
:)

I'd like to offer up my altq.conf file for two purposes: 1) so that
future users searching the archive might find an easy sample to start
from, and 2) for the list folk to critique it for accuracy.  With this
config, I wanted to limit an individual IP to a portion (15%) of the
bandwidth during heavy usage.  Everyone else should fall into the
default class.

##
interface dc1 bandwidth 1M cbq
class cbq dc1 root NULL pbandwidth 100

# meta classes
class cbq dc1 ctl_class root pbandwidth 4 control
class cbq dc1 def_class root borrow pbandwidth 95 default

# Allocate bandwidth
class cbq dc1 foo_class def_class borrow pbandwidth 15
filter dc1 foo_class 0 0 192.168.0.42 netmask 0x 0 0
filter dc1 foo_class 192.168.0.42 netmask 0x 0 0 0 0
##

Thanks again!
-J.






Re: ALTQ: resizing buffer sizes of queues?

2003-02-09 Thread Damien Miller
Henning Brauer wrote:


well 6k is just a little _too_ low for a 100Mb interface (I presume it is
one). the resolution isn't that high I think.
tho, 10k worked somewhat good for me on a 100Mb card - don't expect a too
close match on such absurd low values, as said, the time resoltion is limited.


Cranking HZ would help here, but this doesn't seem to work on i386 at least.

-d





Re: ALTQ: resizing buffer sizes of queues?

2003-02-09 Thread Henning Brauer
On Sun, Feb 09, 2003 at 11:30:49PM +0100, Hendrik Scholz wrote:
> Hi!
> 
> I'm running a box for testing and like to limit outgoing traffic on my
> DSL line.
> My setup looks like this:
> 
> altq on foo0 cbq bandwidth 10Mb queue { std, test}

foo0? damn, my secret diff must have leaked.

> queue std bandwidth 100% cbq (default borrow)
> queue test bandwidth 6Kb cbq (red)
> 
> pass out quick on foo0 proto tcp from any to 1.2.3.4 \
>   keep state queue test
> 
> When transfering data to 1.2.3.4 I see burst of around 140kB in tcpdump
> and then no traffic for some time.
> Overall when transfering the speed won't go below ~35kbyte/s.
> I've played around with qlimit and cbrsize but it didn't help.

well 6k is just a little _too_ low for a 100Mb interface (I presume it is
one). the resolution isn't that high I think.
tho, 10k worked somewhat good for me on a 100Mb card - don't expect a too
close match on such absurd low values, as said, the time resoltion is limited.

> Is there any way to limit the speed to 6kB/s?
> Is there a way to define custom queue sizes with altq/pf just like altq
> itself allows?

we don't have support for the more obscure options in... we're pretty sure
nobody uses them.
which, exactly, do you miss and why? perhaps we really missed something.

> And last but not least: Is there a altqstat like program?

pfctl -vvsq

-- 
Henning Brauer, BS Web Services, http://bsws.de
[EMAIL PROTECTED] - [EMAIL PROTECTED]
Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)




ALTQ: resizing buffer sizes of queues?

2003-02-09 Thread Hendrik Scholz
Hi!

I'm running a box for testing and like to limit outgoing traffic on my
DSL line.
My setup looks like this:

altq on foo0 cbq bandwidth 10Mb queue { std, test}
queue std bandwidth 100% cbq (default borrow)
queue test bandwidth 6Kb cbq (red)

pass out quick on foo0 proto tcp from any to 1.2.3.4 \
  keep state queue test

When transfering data to 1.2.3.4 I see burst of around 140kB in tcpdump
and then no traffic for some time.
Overall when transfering the speed won't go below ~35kbyte/s.
I've played around with qlimit and cbrsize but it didn't help.

Is there any way to limit the speed to 6kB/s?
Is there a way to define custom queue sizes with altq/pf just like altq
itself allows?
And last but not least: Is there a altqstat like program?

Thanks, Hendrik

-- 
Hendrik Scholz - <[EMAIL PROTECTED]> - http://raisdorf.net/

drag me, drop me - treat me like an object