From owner-freebsd-questions@FreeBSD.ORG Mon Dec 12 21:34:44 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8071116A41F for ; Mon, 12 Dec 2005 21:34:44 +0000 (GMT) (envelope-from danial_thom@yahoo.com) Received: from web33312.mail.mud.yahoo.com (web33312.mail.mud.yahoo.com [68.142.206.127]) by mx1.FreeBSD.org (Postfix) with SMTP id 6AA9A43D79 for ; Mon, 12 Dec 2005 21:34:39 +0000 (GMT) (envelope-from danial_thom@yahoo.com) Received: (qmail 52459 invoked by uid 60001); 12 Dec 2005 21:34:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=EVZ2zhDSI/iosJAbwOZAVTLlsJ/wj1yY1MhOeH041c5aIhuUd1mCZYvY3JxN++4Mte+G1iih2zI34xwvlto0sHDx87ToP/PjVFvVAyHsWidLT1ogUMg5/ZavdnD3gz1fZTOvHcN40j5MMM1hGLTjwZjEvMNU9l58nfDwemNyIJo= ; Message-ID: <20051212213437.52457.qmail@web33312.mail.mud.yahoo.com> Received: from [24.46.186.215] by web33312.mail.mud.yahoo.com via HTTP; Mon, 12 Dec 2005 13:34:37 PST Date: Mon, 12 Dec 2005 13:34:37 -0800 (PST) From: Danial Thom To: Drew Tomlinson , Ted Mittelstaedt In-Reply-To: <439DDDDB.2080902@mykitchentable.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 12 Dec 2005 21:43:19 +0000 Cc: Michael Vince , danial_thom@yahoo.com, freebsd-questions@freebsd.org, Kris Kennaway Subject: Re: Polling For 100 mbps Connections? (Was Re: Freebsd Theme Song) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: danial_thom@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2005 21:34:44 -0000 --- Drew Tomlinson wrote: > On 12/12/2005 8:13 AM Ted Mittelstaedt wrote: > > >Michael, > > > > Fundamentally, here's the problem Danial is > claiming exists: > > > >it takes a certain amount of time to get the > packet clocked in > >from the network into the ethernet receiver. > This is hardware > >dependent and cannot be changed. > > > >It takes a certain amount of time to get the > packet out of > >the hardware in the ethernet card into main > ram, this also > >hardware dependent and cannot be changed. > (unless the device > >driver is terribly inefficient, which we will > assume it's not) > > > >Once in main ram, the information in the > packet has to go through > >a number of code statements. The more code > statements the > >longer the information in the packet is > sitting around in > >the FreeBSD system's memory. > > > >It then takes a certain amount of time to get > the information > >out of main memory into the other sending > ethernet nic's buffers, > > > >and it takes time to get it out of the sending > nic back to the > >wire. > > > >Danial is claiming the slowness is in the main > ram section of > >things, not in the ethernet driver code. > > > >polling makes the ethernet driver more > efficient at high data > >rates, but it does nothing for the speed of > processing within > >the TCPIP stack itself. At low data rates > polling is less > >efficient than the interrupt method. And > unless the nic driver > >is terribly inefficient to start with, the > time it adds to the > >packet path in the system is minor compared to > the time spent > >in the TCP/IP stack. > > > >Ted > > > > > > Thanks for the explanation. So would polling > be beneficial or > detrimental for a 100 mbps Ethernet card? Not > sure if 100 mbps is > considered "high" or "low" speed. I'm > specifically interested in > NetGear cards using the dc driver or DLink > cards using the rl driver. I don't think I'm claiming that at all. The slowness is in the latency and inefficiencies of the scheduler and whatever other kernel "stuff" (locking, general overheads). The entire point of the tests are that the managing of the packets is a constant, in that its the same hardware and mostly the same code. Now I suppose its possible that the em driver could just be slower in 5.4 and 6.0, but the code is fundamentally the same, so it should be a constant. So since the processing of the packets is a constant, then if you can process less packets on the same machine the overhead of the OS must be the culprit. It could be the code, particularly if you've compiled with a different compiler, but there are only slight variations in code performance generally, unless some macro was changed that say, efficts 100s of thousands of I/O operations per second and adds a few cycles to each. Polling is only beneficial if your ethernet card actually interrupts for every event, which few likely do. Intel cards (fxp and em driver) have built-in hold offs so you get the supposed benefits of polling without all the overhead. fxp cards will never interrupt more then 6000 times per second, and em cards have a tunable with the default at 8000. DT __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com