From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 6 05:23:35 2009 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76BC1106564A for ; Fri, 6 Mar 2009 05:23:35 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [220.233.188.227]) by mx1.freebsd.org (Postfix) with ESMTP id E7D068FC13 for ; Fri, 6 Mar 2009 05:23:34 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id n265NULv072789; Fri, 6 Mar 2009 16:23:32 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 6 Mar 2009 16:23:29 +1100 (EST) From: Ian Smith To: Luigi Rizzo In-Reply-To: <20090304210017.GA29615@onelab2.iet.unipi.it> Message-ID: <20090306153751.D71460@sola.nimnet.asn.au> References: <49AED3B1.1060209@net.t-labs.tu-berlin.de> <20090304210017.GA29615@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-ipfw@freebsd.org, Sebastian Mellmann Subject: Re: ipfw (dummynet) adds delay, but not configured to do so X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 05:23:35 -0000 On Wed, 4 Mar 2009, Luigi Rizzo wrote: > On Wed, Mar 04, 2009 at 08:17:05PM +0100, Sebastian Mellmann wrote: > > Hi everyone! > > > > I hope this is the right place to ask. > > > > I've got a IPFW ruleset that looks like this: > > > > cmd=ipfw > > bottleneck_bandwidth=100Mbit/s > > in_if="em0" > > > > $cmd pipe 500 config bw $bottleneck_bandwidth > > $cmd add pipe 500 all from any to any via $in_if > > the delay that a packet experiences corresponds to len/bandwidth, > often rounded up to the next clock tick (1ms is the default). > You get one delay inbound, one delay outbound, so that's 2ms. After finally getting almost enough sleep, I've just realised, duh, that Sebastian likely already had the default kern.hz=1000, ie 1ms, so would need something faster to achieve less delay. Which led me to take my own medicine and reread the dummynet sections in ipfw(8) at 7.1-RELEASE: delay ms-delay Propagation delay, measured in milliseconds. The value is rounded to the next multiple of the clock tick (typically 10ms, but it is a good practice to run kernels with ``options HZ=1000'' to reduce the granularity to 1ms or less). Default value is 0, meaning no delay. Firstly, this is well out of date; the default has been HZ=1000 since 6.1-R or earlier, a ten-fold increase on the old 100Hz. I'm not sure however that 10000 would be a suitable suggestion, even with today's processor speeds? Secondly, apropos Sebastian's experience, should this say "The value (even if 0) is rounded to the next multiple of the clock tick .." ? ^^^^^^^^^^^ cheers, Ian