From owner-freebsd-current@FreeBSD.ORG Fri Aug 25 08:41:29 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 C0A4716A4DD for ; Fri, 25 Aug 2006 08:41:29 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from grunt3.ihug.co.nz (grunt3.ihug.co.nz [203.109.254.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2ACF543D4C for ; Fri, 25 Aug 2006 08:41:29 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: from 203-109-251-39.static.bliink.ihug.co.nz (heff.fud.org.nz) [203.109.251.39] by grunt3.ihug.co.nz with esmtp (Exim 3.35 #1 (Debian)) id 1GGXFm-0006Uz-00; Fri, 25 Aug 2006 20:41:26 +1200 Received: by heff.fud.org.nz (Postfix, from userid 1001) id 503AF1CC23; Fri, 25 Aug 2006 20:41:26 +1200 (NZST) Date: Fri, 25 Aug 2006 20:41:26 +1200 From: Andrew Thompson To: Ian FREISLICH Message-ID: <20060825084126.GA80099@heff.fud.org.nz> Mail-Followup-To: Andrew Thompson , Ian FREISLICH , freebsd-current@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 Cc: freebsd-current@freebsd.org 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 08:41:29 -0000 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. > > 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 but its valuable kernel memory. It was discussed a bit here, http://lists.freebsd.org/pipermail/freebsd-net/2005-October/008716.html cheers, Andrew