From owner-freebsd-net@FreeBSD.ORG Wed Sep 30 06:22:38 2009 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97E2B106566B for ; Wed, 30 Sep 2009 06:22:38 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 035D38FC27 for ; Wed, 30 Sep 2009 06:22:37 +0000 (UTC) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n8U6MYJS034841; Wed, 30 Sep 2009 14:22:34 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n8U6MXo8034839; Wed, 30 Sep 2009 14:22:33 +0800 (KRAST) (envelope-from eugen) Date: Wed, 30 Sep 2009 14:22:33 +0800 From: Eugene Grosbein To: Brett Glass Message-ID: <20090930062233.GA28758@svzserv.kemerovo.su> References: <200909291855.MAA21423@lariat.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909291855.MAA21423@lariat.net> User-Agent: Mutt/1.4.2.3i Cc: net@freebsd.org Subject: Re: ipfw gred parameters 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: Wed, 30 Sep 2009 06:22:38 -0000 On Tue, Sep 29, 2009 at 12:54:53PM -0600, Brett Glass wrote: > I've been trying to determine the best parameters for gred ("gentle > RED") to allow graceful bandwidth limiting in ipfw, but have found > precious little guidance on the Web as to what the parameters mean. > The code gives some hints, but I'm still uncertain: what parameters > work best in a typical system? And how do the parameters submitted > to "dummynet" correspond to the ones usually seen in descriptions > of the algorithm? I use the following schema: ipfw add pipe $pipeno config bw ${group_bw}Kbit/s queue $qslots \ gred $w_q/$q_min/$q_max/$max_p pipeno: number of pipe group_bw: total pipe bandwidth qslots: length of GRED queue w_q: constantly equals to 0.002 (0 < w_q < 1), exponential factor max_p: constantly equals to 0.1, the probability of packet drop lineary grows from zero upto $max_p while GRED queue occupancy grows upto $q_min. q_min: see max_p q_max the probability of packet drop lineary grows from max_p to 1 while GRED queue occupancy grows from q_min to q_max I choose q_min = 0.9*qslots, q_max = qslots. For narrow pipes qslots should be small if short ping delays are more preferable, e.g. qslots=50 for 256Kbit/s or qslots=30 for 64Kbit/s. For large bandwidth it's suitable to increase qslots; for example, I use qslots=1000 for 10-15Mbit/s. Eugene Grosbein