Re: pf traffic shaping and perfomance




Hi Luke,

On Wed, 23 Apr 2008 12:40:04 -0700 (PDT), Luke Dean <LukeD@xxxxxxxxx>
wrote:


On Wed, 23 Apr 2008, Zbigniew Szalbot wrote:


Hello,

I would like to implement traffic shaping using pf. I know I need to
recompile kernel to be able to achieve this but I have a more general
question. I used to have pf with traffic shaping on a Pentium III 866
before and as soon as I activated it, the http response of the box was
noticably slower. Here are the defs I used then:

#altq on $ext_if cbq bandwidth 512Kb queue { def, smtp, udp, http, \
#ssh, icmp }
#queue def bandwidth 13% cbq(default borrow red)
#queue smtp bandwidth 25% cbq(borrow red) priority 7
#queue udp bandwidth 10% cbq(borrow red)
#queue http bandwidth 40% cbq(borrow red)
#queue ssh bandwidth 10% cbq(borrow red)
##{ ssh_interactive, ssh_bulk }
##queue ssh_interactive priority 7
#queue ssh_bulk priority 0
#queue icmp bandwidth 2% cbq

It is quite possible that I misconfigured the shaping (as seen above).
What
would be suggested traffic shaping rules to allow smooth mail operation
(smtp taking up to 40% of allowed bandwidth) and http responses?

If that matters, uname -v
FreeBSD 7.0-RELEASE #0


Many thanks in advance!

I had the same problem with class-based queueing when I tried this. I
suspect that the 512Kb in your initial queue definition is the limiting
factor. I never did get it to work like I expected it to, however, so
maybe I just don't understand it.

Eventually I realized that I didn't actually want to chop up my bandwidth
like this. What I really wanted to do was simply prioritize the traffic.
The most important applications get first shot at the bandwidth, and the
less important applications get choked when they need to be. I switched
to priority queueing and I've been very happy with it.

Thanks! That gives me a clue! Would you mind sharing your defs? I'll be
reading the man anyway.

Zbigniew Szalbot

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: How to shape VoIP traffic on FreeBSD 4.8 router?
    ... I'd also like to give TCP ACK packets a priority boost. ... > traffic without assimilating bandwidth. ... Define 1 pipe for the entire upstream bandwidth. ... add queue 2 ip from any to any not ssh,telnet,ntp out via oif ...
    (comp.unix.bsd.freebsd.misc)
  • wierd output from pfctl -vvsq
    ... queue tcp_ack bandwidth 44Kb priority 7 cbq(borrow) ...
    (freebsd-questions)
  • pf traffic shaping and perfomance
    ... I would like to implement traffic shaping using pf. ... before and as soon as I activated it, the http response of the box was ... #queue def bandwidth 13% cbq ...
    (freebsd-questions)
  • cbq not borrowing fully from parent queue
    ... I'm running 6-STABLE using pf and altq/cbq to manage bandwidth on my ... queue internal bandwidth 53104Kb priority 7 cbq ... so it can't borrow from the root queue. ...
    (freebsd-questions)
  • Re: pf traffic shaping and perfomance
    ... I would like to implement traffic shaping using pf. ... #queue def bandwidth 13% cbq ... #queue ssh_bulk priority 0 ...
    (freebsd-questions)