From owner-freebsd-net@FreeBSD.ORG Fri Nov 16 21:31:05 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 7C11B16A46C for ; Fri, 16 Nov 2007 21:31:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 1A14E13C467 for ; Fri, 16 Nov 2007 21:31:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lAGLUw16003186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Nov 2007 08:31:02 +1100 Date: Sat, 17 Nov 2007 08:30:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Igor Sysoev In-Reply-To: <20071116154019.GE93422@rambler-co.ru> Message-ID: <20071117065908.T65479@delplex.bde.org> References: <20071116154019.GE93422@rambler-co.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@FreeBSD.org Subject: Re: bge loader tunables 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: Fri, 16 Nov 2007 21:31:05 -0000 On Fri, 16 Nov 2007, Igor Sysoev wrote: > The attached patch creates the following bge loader tunables: I plan to commit old work to do this using sysctls. Tunables are harder to use and aren't needed since changes to the defaults aren't needed for booting. I also implemented dynamic tuning for rx coal parameters so that the sysctls are mostly not needed. Ask for patches if you want to test this extensively. > hw.bge.rxd=512 > > Number of standard receive descriptors allocated by the driver. > The default value is 256. The maximum value is 512. I always use 512 for this. The corresponding value for jumbo buffers is hard-coded (JSLOTS exists to tune the value at config time, like SSLOTS does for this, but is no longer used). Only machines with a small amount of memory should care about the wastage from always allocating the max number of descriptors. > hw.bge.rx_int_delay=500 > > This value delays the generation of receive interrupts in microseconds. > The default value is 150 microseconds. This is a good default. I normally use 100 (goes with dynamic tuning to limit the rx interrupt rate to 10 kHz). > hw.bge.tx_int_delay=500 > > This value delays the generation of transmit interrupts in microseconds. > The default value is 150 microseconds. I use 1 second. Infinity works right, except it wastes mbufs when the tx is idle for a long time. > hw.bge.rx_coal_desc=64 > > This value delays the generation of receive interrupts until specified > number of packets will be received. The default value is 10. 64 is a good default. 10 is a bad default (it optimizes too much for latency at a cost of efficiency to be good). I use 1 when optimizing for latency. Dynamic tuning sets this to a value suitable for limiting the rx interrupt rate to a specified frequency (10 kHz is a good limit). > hw.bge.tx_coal_desc=128 > > This value delays the generation of transmit interrupts until specified > number of packets will be transmited. The default value is 10. 128 is a good default. I use 384. There are few latency issues here, so the default of 10 mainly costs efficiency. Bruce