From owner-freebsd-net@FreeBSD.ORG Tue Dec 11 09:36:57 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DAFD16A419 for ; Tue, 11 Dec 2007 09:36:57 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id D128F13C447 for ; Tue, 11 Dec 2007 09:36:56 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lBB9astP008412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Dec 2007 20:36:54 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id lBB9ar9E087563; Tue, 11 Dec 2007 20:36:53 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id lBB9aroE087562; Tue, 11 Dec 2007 20:36:53 +1100 (EST) (envelope-from peter) Date: Tue, 11 Dec 2007 20:36:53 +1100 From: Peter Jeremy To: rihad Message-ID: <20071211093653.GN11310@server.vk2pj.dyndns.org> References: <475D6FD7.2000500@mail.ru> <20071210120353.B40679@xorpc.icir.org> <475DA624.4010104@seclark.us> <475E1E4D.4090409@mail.ru> <20071211074353.GI11310@server.vk2pj.dyndns.org> <475E4AC4.4030903@mail.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jx/LfW4V5TfZLeq7" Content-Disposition: inline In-Reply-To: <475E4AC4.4030903@mail.ru> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-net@freebsd.org Subject: Re: Pipe queues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 09:36:57 -0000 --jx/LfW4V5TfZLeq7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=20 >>> 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=20 >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. --=20 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. --jx/LfW4V5TfZLeq7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHXlo1/opHv/APuIcRAuHaAKC6fbLIe31XswBa3FjsCc0M3zbYrQCeKpOC Ie2kjpZbwCWhSSxBZ0ATmT8= =5sCA -----END PGP SIGNATURE----- --jx/LfW4V5TfZLeq7--