From owner-freebsd-stable@FreeBSD.ORG Thu Jul 20 15:36:24 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9B6F16A4DA for ; Thu, 20 Jul 2006 15:36:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF94343D49 for ; Thu, 20 Jul 2006 15:36:21 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k6KFaEVY016037; Thu, 20 Jul 2006 09:36:19 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <44BFA2EE.7060308@samsco.org> Date: Thu, 20 Jul 2006 09:36:14 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Jeremy References: <20060711190908.GC69272@registro.br> <20060720023856.GA65960@sandvine.com> <20060720112613.GB716@turion.vk2pj.dyndns.org> In-Reply-To: <20060720112613.GB716@turion.vk2pj.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-stable@freebsd.org, Ed Maste Subject: Re: How to setup polling on 'bge' interface X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2006 15:36:24 -0000 Peter Jeremy wrote: > On Wed, 2006-Jul-19 22:38:56 -0400, Ed Maste wrote: > >>- You may have to adjust some parameters in the kern.polling sysctl >> tree - specifically, kern.polling.burst_max, kern.polling.each_burst >> and kern.polling.user_frac might need tweaking. > > > Note that increasing kern.polling.burst_max and kern.polling.each_burst > will also increase the number of soft interrupts. > > >>- The polling feedback algorithm does not work very well if your >> workload is focused largely on per-packet tasks (such as routing or >> bridging). You'll find that there is still idle CPU time at the >> point you start dropping packets. I have some work in progress to >> address this, but it's not yet committed. > > > I thought setting kern.polling.idle_poll would allow the CPU to > utilise all idle time. The downside is that the system always shows > as 100% utilised so it's very difficult to know how busy the system > actually is. > > >>- Polling's major advantage is the avoidance of livelock on UP systems, >> and not improved performance. > > > The limited testing I've done on a Sun V20z at work suggests that you > can get better routing throughput in interrupt mode than polling mode. > YMMV and this is before tweaking the polling parameters. (My testing > also suggests that I don't really need to do any tweaking because > the limiting factor is the gigabit interfaces rather than the V20z). > This might not apply to bge, but the adaptive polling + fast interrupt changes that I made to if_em earlier in the year were a huge win over the standard polling code in terms of CPU utilization and packets per second. I think it also survived a load that caused normal polling to essentially livelock the machine. And, it had the advantage of automatically adapting to bursty loads. Scott