From owner-freebsd-current@FreeBSD.ORG Fri Aug 25 09:51:59 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51A7E16A53E; Fri, 25 Aug 2006 09:51:59 +0000 (UTC) (envelope-from if@hetzner.co.za) Received: from hetzner.co.za (office.cpt2.your-server.co.za [196.7.147.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id B67AD43D45; Fri, 25 Aug 2006 09:51:58 +0000 (GMT) (envelope-from if@hetzner.co.za) Received: from localhost ([127.0.0.1] helo=ian.hetzner.africa) by hetzner.co.za with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1GGYM0-000CVd-1K; Fri, 25 Aug 2006 11:51:56 +0200 To: Andrew Thompson , freebsd-current@freebsd.org From: Ian FREISLICH In-Reply-To: Message from Andrew Thompson of "Fri, 25 Aug 2006 20:41:26 +1200." <20060825084126.GA80099@heff.fud.org.nz> X-Attribution: BOFH Date: Fri, 25 Aug 2006 11:51:56 +0200 Message-Id: Cc: Subject: Re: 802.1Q vlan performance. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2006 09:51:59 -0000 Andrew Thompson wrote: > On Fri, Aug 25, 2006 at 09:37:46AM +0200, Ian FREISLICH wrote: > > Hi > > > > While doing some experimentation and work on ipfw to see where I > > could improve performance for our virtualised firewall I came across > > the following comment in sys/net/if_vlan.c: > > > > * The VLAN_ARRAY substitutes the dynamic hash with a static array > > * with 4096 entries. In theory this can give a boots(sic) in processing, > > * however on practice it does not. Probably this is because array > > * is too big to fit into CPU cache. Just so that performance is not ignored, this option yields ~8% improvement on packet rate (consistent with the thread posted below) and CPU utilisation down from 75% to 3% in interrupt time. I'm not convinced that this should be sniffed at. > > Can anyone suggest a good reason not to turn this option on by > > default. It looks to me like it dramatically improves performance. > > Its because of the amount of memory it uses, 16k doesnt sound like much Wow, and I just added a 256k lookup table to ipfw (uncommitted) to boost performance. > but its valuable kernel memory. It was discussed a bit here, > http://lists.freebsd.org/pipermail/freebsd-net/2005-October/008716.html So, it seems that the main cause for concern is embedded devices with little memory. As far as I know (from what little gets posted here about embedded applications) quite a lot of of stuff gets stripped out and stripped down. I think it's a small ask to have the embedded ports unset this option to get a little memory and kill performance, although it's unlikely that El Tiny Embed is going to be running thousands of vlans. Alternatively is there an objection to making this a kernel configuration file option as opposed to leaving it as an undocumented buried treasure? Ian -- Ian Freislich