From owner-svn-src-head@FreeBSD.ORG Sat Nov 10 02:56:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AEB7B8FE; Sat, 10 Nov 2012 02:56:37 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 32A378FC0A; Sat, 10 Nov 2012 02:56:37 +0000 (UTC) Received: from Alfreds-MacBook-Pro-5.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id EC4BE1A3C22; Fri, 9 Nov 2012 18:56:30 -0800 (PST) Message-ID: <509DC25E.5030306@mu.org> Date: Fri, 09 Nov 2012 18:56:30 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r242847 - in head/sys: i386/include kern References: <201211100208.qAA28e0v004842@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2012 02:56:37 -0000 On 11/9/12 6:34 PM, Eitan Adler wrote: > On 9 November 2012 21:08, Alfred Perlstein wrote: >> Modified: head/sys/kern/subr_param.c >> +#ifdef VM_MAX_AUTOTUNE_MAXUSERS >> + if (maxusers > VM_MAX_AUTOTUNE_MAXUSERS) >> + maxusers = VM_MAX_AUTOTUNE_MAXUSERS; >> +#endif >> + /* >> + * Scales down the function in which maxusers grows once >> + * we hit 384. >> + */ >> + if (maxusers > 384) >> + maxusers = 384 + ((maxusers - 384) / 8); >> + } > Hey, > > I know you didn't introduce this magic number 384. But can you (or > someone else) explain where it came from? > Sure, this is magic for i386 PAE machines. 384 maxusers was pretty much the highest you wanted auto-tuned SAFELY for 32bit KVA on i386. Now with 64 bit machines doing away with this hard ceiling, I wanted to change the slope so that it doesn't grow too much as a conservative measure to test the waters. Take for example my amd64 machine with 16GB of ram. Without the scaling factor of "maxusers = 384 + ((maxusers - 384) / 8)" then I get 8173 maxusers. 8173 maxusers translates to 524096 nmbclusters (1024 + 8173 * 64). That is 2GB RAM for just nmbclusters, nevermind jumbo9 and jumbo16. With the scaling adjustment I get 1357 maxusers which is 87872 nmbclusters. That is 343MB. Somewhat more reasonable. I'm open to other suggestions and people coming in here to open the value up higher... however I wanted a conservative value for now to avoid too much concern. We'll see where this takes us. -Alfred With this patch I get 75104 nmbclusters, which is 75104 pages which is 293 MB of ram!