Understanding queue size

Michael Sierchio kudzu at tenebras.com
Fri May 23 07:15:42 PDT 2003

jeremie le-hen wrote:

> I'm trying to tune some parameters like queue size in order to reduce delays
> with interactive traffic while uploading. I tried to set various queue size
> with a pipe which bandwidth is 125KBit/s, from 2KBytes to 1000KBytes, and
> in fact I saw almost no responsivness variation.
> I currently use a queue size of 76KBytes, in order to send it in about 5
> seconds at 125KBit/s. How do I know it's a good value ? I'm pretty sure
> there are some rules or some formulas which dictates how to get a good
> compromise between bandwidth and reactivy, but unfortunatelly, I don't
> know where to find them.

Ah, you're adjusting the camel from the wrong end. ;-)

It's not queue size you want to adjust.  If you want to reduce
delays for interactive traffic (telnet?  ssh?  etc.) assign that
traffic to a different queue, and all the queues to the same pipe.
Then you get the promised "worst case weighted fair queueing"

Once you've done this, then you might consider decreasing the
queue size on the interactive traffic.  If it's full, it will
get priority.  I'd think in terms of numbers of packets rather
than octets, probably...

E.g. (my location)

ipfw pipe 1 config bw 768000bit/s
ipfw pipe 2 config bw 768000bit/s

ipfw queue 11 config pipe 1 weight 10
ipfw queue 12 config pipe 2 weight 10
ipfw queue 13 config pipe 1 weight 50
ipfw queue 14 config pipe 2 weight 50

ipfw add queue 13 ip from $internal_hosts to any ssh,telnet out xmit $external_if
ipfw add queue 11 ip from $internal_hosts to any not ssh,telnet out xmit $external_if

You get the idea...

More information about the freebsd-ipfw mailing list