From owner-freebsd-net@FreeBSD.ORG Tue Jul 27 02:56:41 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B15416A4CE for ; Tue, 27 Jul 2004 02:56:41 +0000 (GMT) Received: from ylpvm01.prodigy.net (ylpvm01-ext.prodigy.net [207.115.57.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 123CA43D49 for ; Tue, 27 Jul 2004 02:56:41 +0000 (GMT) (envelope-from kbyanc@posi.net) Received: from gateway.posi.net (adsl-63-201-93-86.dsl.snfc21.pacbell.net [63.201.93.86])i6R2ucAt019830; Mon, 26 Jul 2004 22:56:39 -0400 Received: from localhost (localhost [127.0.0.1]) by gateway.posi.net (Postfix) with ESMTP id C45376A046A; Mon, 26 Jul 2004 19:57:49 -0700 (PDT) Date: Mon, 26 Jul 2004 19:57:49 -0700 (PDT) From: Kelly Yancey To: Luigi Rizzo In-Reply-To: <20040726132618.A37401@xorpc.icir.org> Message-ID: <20040726195434.V76990@gateway.posi.net> References: <20040726132618.A37401@xorpc.icir.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-net@freebsd.org cc: 'James' Subject: Re: device polling takes more CPU hits?? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 02:56:41 -0000 On Mon, 26 Jul 2004, Luigi Rizzo wrote: > On Mon, Jul 26, 2004 at 01:18:46PM -0700, Kelly Yancey wrote: > ... > > Out of curiousity, what sort of testing did you do to arrive at these > > settings? I did some testing a while back with a SmartBits box pumping > > packets through a FreeBSD 2.8Ghz box configured to route between two em > > gigabit interfaces; I found that changing the burst_max and each_burst > > parameters had almost no effect on throughput (maximum 1% difference). > > fast boxes are pci-bus limited, not CPU limited(*) so changing the burst > size (which basically amortizes some CPU costs) has little if any > effect. > > (*) this doesn't mean that the box cannot livelock, as depending on > the traffic on the bus, the CPU might stall for long intervals > waiting for bus transactions to complete, and becomes unable to > do anything at all. So you might still need polling. > > cheers > luigi > Oh, I found polling to be vastly superior to interrupts under load on the test machine. Not only did it avoid livelock, the throughput was about 10Mbps higher for small (64-byte) frames. I just didn't find much difference whether I used small burst sizes versus large burst sizes. It may have had to do with the fact that both the sending and receiving interfaces were gigabit em cards and were polling (no interrupts from the NICs at all). Kelly -- Kelly Yancey - kbyanc@{posi.net,FreeBSD.org} - kelly@nttmcl.com Join distributed.net Team FreeBSD: http://www.posi.net/freebsd/Team-FreeBSD/