From owner-freebsd-net@FreeBSD.ORG Thu Jun 18 14:24:15 2009 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 3AD3F1065670 for ; Thu, 18 Jun 2009 14:24:15 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from mailrelay1.rambler.ru (mailrelay1.rambler.ru [81.19.66.239]) by mx1.freebsd.org (Postfix) with ESMTP id E28948FC0C for ; Thu, 18 Jun 2009 14:24:14 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from kas30pipe.localhost (localhost [127.0.0.1]) by mailrelay1.rambler.ru (Postfix) with ESMTP id 168BC130EF8; Thu, 18 Jun 2009 18:24:14 +0400 (MSD) Received: from localhost (is1.park.rambler.ru [81.19.64.121]) by mailrelay1.rambler.ru (Postfix) with ESMTP id BBECF130EF7; Thu, 18 Jun 2009 18:24:13 +0400 (MSD) Date: Thu, 18 Jun 2009 18:19:25 +0400 From: Igor Sysoev To: Bruce Evans Message-ID: <20090618141925.GG60354@rambler-co.ru> References: <20090610123301.GE40250@rambler-co.ru> <20090611114120.I21056@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20090611114120.I21056@delplex.bde.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.33/RELEASE, bases: 18062009 #2361103, status: clean X-SpamTest-Envelope-From: is@rambler-co.ru X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 8780 [Jun 18 2009] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Method: white ip list X-SpamTest-Rate: 0 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release Cc: freebsd-net@FreeBSD.org Subject: Re: bge interrupt coalescing sysctls 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: Thu, 18 Jun 2009 14:24:15 -0000 On Thu, Jun 11, 2009 at 11:54:29AM +1000, Bruce Evans wrote: > On Wed, 10 Jun 2009, Igor Sysoev wrote: > > >For a long time I used Bruce Evans' patch to tune bge interrupt coalescing: > >http://lists.freebsd.org/pipermail/freebsd-net/2007-November/015956.html > >However, recent commit SVN r192478 in 7-STABLE (r192127 in HEAD) had broken > >the patch. I'm not sure how to fix the collision, and since I do not > >use dynamic tuning > > That commit looked ugly (lots of internal API changes and bloat in interrupt > handlers in many network drivers to support polling which mostly shouldn't > be supported at all and mostly doesn't use the interrupt handlers). > > >I has left only static coalescing parameters in the patch > >and has added a loader tunable to set number of receive descriptors and > >read only sysctl to read the tunable. I usually use these parameters: > > > >/boot/loader.conf: > >hw.bge.rxd=512 > > > >/etc/sysctl.conf: > >dev.bge.0.rx_coal_ticks=500 > >dev.bge.0.tx_coal_ticks=10000 > >dev.bge.0.rx_max_coal_bds=64 > > These rx settings give to high a latency for me. Probably, however, I use this on a host that has 6000 packets/s. > >dev.bge.0.tx_max_coal_bds=128 > ># apply the above parameters > >dev.bge.0.program_coal=1 > > > >Could anyone commit it ? > > Not me, sorry. > > The patch is quite clean. If I committed then I would commit the > dynamic coalescing configuration separately anyway. So have you any objections if some one else will commit this patch ? > You can probably make hw.bge.rxd a sysctl too (it would take a down/up > to get it changed, but that is already needed for too many parameters > in network drivers anyway). I should use a sysctl for the ifq length > too. This could be done at a high level for each driver. Limiting > queue lengths may be a good way to reduce cache misses, while increasing > them is sometimes good for reducing packet loss. Do you mean simple command sequence: sysctl hw.bge.rxd=512 ifconfig down ifconfig up or SYSCTL_ADD_PROC for hw.bge.rxd ? -- Igor Sysoev http://sysoev.ru/en/