From owner-freebsd-arch@FreeBSD.ORG Fri Dec 27 23:29:21 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3D40996 for ; Fri, 27 Dec 2013 23:29:21 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id B00FE19CD for ; Fri, 27 Dec 2013 23:29:21 +0000 (UTC) Received: from Alfreds-MacBook-Air.local (50-204-88-5-static.hfc.comcastbusiness.net [50.204.88.5]) by elvis.mu.org (Postfix) with ESMTPSA id A21FC1A3C37 for ; Fri, 27 Dec 2013 15:29:10 -0800 (PST) Message-ID: <52BE0D40.5020304@freebsd.org> Date: Fri, 27 Dec 2013 15:29:04 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: freebsd-arch@freebsd.org Subject: Re: Default knote hash table size is too .. small References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 23:29:21 -0000 On 12/27/13, 2:41 PM, Adrian Chadd wrote: > Hi, > > The default knote hash table size (KN_HASHSIZE) is 64. When doing > dirty things with lots of sockets (say, 64k and more) that involve > plenty of knote insert/remove (ie, oneshot events - think posix AIO > and my upcoming kqueue sendfile notification stuff) it consumes stupid > amounts of CPU. > > I'd like to make this a tunable so people like Adrian at Netflix can > bump this to higher values (say 32k) but people like Adrian at > Embedded can bump this to lower values (say 64.) > > Comments? I'll make the change soon if no-one objects. > > Thanks, Cool! What about auto-tune to maxfiles? -Alfred