Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2012 18:56:30 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Eitan Adler <eadler@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein <alfred@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r242847 - in head/sys: i386/include kern
Message-ID:  <509DC25E.5030306@mu.org>
In-Reply-To: <CAF6rxg=HPmQS1T-LFsZ=DuKEqH30iJFpkz%2BJGhLr4OBL8nohjg@mail.gmail.com>
References:  <201211100208.qAA28e0v004842@svn.freebsd.org> <CAF6rxg=HPmQS1T-LFsZ=DuKEqH30iJFpkz%2BJGhLr4OBL8nohjg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/9/12 6:34 PM, Eitan Adler wrote:
> On 9 November 2012 21:08, Alfred Perlstein <alfred@freebsd.org> 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!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509DC25E.5030306>