From owner-freebsd-ipfw@FreeBSD.ORG Fri Mar 6 14:15:14 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 5F6C5106566C for ; Fri, 6 Mar 2009 14:15:14 +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 CD6E28FC2B for ; Fri, 6 Mar 2009 14:15:13 +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 n26EFBsB091359; Sat, 7 Mar 2009 01:15:12 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sat, 7 Mar 2009 01:15:11 +1100 (EST) From: Ian Smith To: Luigi Rizzo In-Reply-To: <20090306070011.GA94585@onelab2.iet.unipi.it> Message-ID: <20090307003515.W71460@sola.nimnet.asn.au> References: <49AED3B1.1060209@net.t-labs.tu-berlin.de> <20090304210017.GA29615@onelab2.iet.unipi.it> <20090306153751.D71460@sola.nimnet.asn.au> <20090306070011.GA94585@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 14:15:14 -0000 On Fri, 6 Mar 2009, Luigi Rizzo wrote: > On Fri, Mar 06, 2009 at 04:23:29PM +1100, Ian Smith wrote: > ... > > 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? > > You can bump it up HZ but there are things that do not scale as well > as CPU clock frequencies. E.g. the access to slow peripherals on > the PCI or ISA buses is still as slow as it was 15 years ago, > and if your timer-driven routine needs to access one of those > peripherals it might consume a significant number of microseconds. > At HZ=1000 this is probably negligible; at HZ=10k you might start > noticing. Indeed. HZ=1000 is a bit busy (like ~+10% CPU) on a Celeron 300 laptop, now at 250Hz, no dummynet. I expect 10kHz slicing would drown it, ie without some qualification re CPU clock, suggested defaults are risky. > > Secondly, apropos Sebastian's experience, should this say "The value > > (even if 0) is rounded to the next multiple of the clock tick .." ? > > ^^^^^^^^^^^ > > 0 is rounded to 0 so that's not an issue. > The delay Sebastian is seeing comes from the babdnwidth limitation, > which is causing a non-zero "transmission time" which is rounded up. Think I've almost starting to get this, thanks. cheers, Ian