Pipe queues

Peter Jeremy peterjeremy at optushome.com.au
Tue Dec 11 01:36:57 PST 2007

On Tue, Dec 11, 2007 at 12:31:00PM +0400, rihad wrote:
>Peter Jeremy wrote:
>> On Tue, Dec 11, 2007 at 09:21:17AM +0400, rihad wrote:
>>> And if I _only_ want to shape IP traffic to given speed, without 
>>> prioritizing anything, do I still need queues? This was the whole point.
>> No you don't.  I'm using pipes without queues extensively to simulate
>> WANs without bothering with any prioritisation.
>Great! One fine point remains, though:
># ipfw pipe 1 config bw 128Kbit/s
>will use a queue of 50 slots by default. What good are they for, if I 
>didn't ask for queuing in the first place?

'queue' is used in two distinct ways within the ipfw/dummynet code:
1) There's a "queue" object created with 'ipfw queue NNN config ...'
   This is used to support WF2Q+ to allow a fixed bandwidth to be
   unevenly shared between different traffic types.
2) There is a "queue" option on the "pipe" object that defines a FIFO
   associated with the pipe.

I had assumed you were talking about the former (and my response was
related to this) but given your latest posting, and having re-read the
thread, I suspect I may have been wrong.  Whilst I don't use queue
objects, I do use the queue option on my pipes.

In your example, you have a pipe that can handle 128kbps (16kBps).  If
you write a 1600byte packet to it, then the packet will reappear
100msec later.  Any further packets written to that pipe during that
time will be dropped if they can't be placed on a queue.  The
practical throughput depends on the number of queue slots available
and the number of writers.  I suggest you do some reading on queueing
theory for the gory details.

Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20071211/7cd55042/attachment.pgp

More information about the freebsd-net mailing list