On Wed, Oct 24, 2012 at 6:46 PM, Alfred Perlstein <alf...@freebsd.org> wrote: > Author: alfred > Date: Thu Oct 25 01:46:20 2012 > New Revision: 242029 > URL: http://svn.freebsd.org/changeset/base/242029 > > Log: > Allow autotune maxusers > 384 on 64 bit machines > > A default install on large memory machines with multiple 10gigE interfaces > were not being given enough mbufs to do full bandwidth TCP or NFS traffic. > > To keep the value somewhat reasonable, we scale back the number of > maxuers by 1/6 past the 384 point. This gives us enough mbufs for most > of our pretty basic 10gigE line-speed tests to complete. > > Modified: > head/sys/kern/subr_param.c > > Modified: head/sys/kern/subr_param.c > ============================================================================== > --- head/sys/kern/subr_param.c Thu Oct 25 01:27:01 2012 (r242028) > +++ head/sys/kern/subr_param.c Thu Oct 25 01:46:20 2012 (r242029) > @@ -278,8 +278,16 @@ init_param2(long physpages) > maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); > if (maxusers < 32) > maxusers = 32; > - if (maxusers > 384) > - maxusers = 384; > + /* > + * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit. > + * Scales it down 6x for large memory machines. > + */ > + if (maxusers > 384) { > + if (sizeof(void *) <= 4) > + maxusers = 384; > + else > + maxusers = 384 + ((maxusers - 384) / 6);
Why `/ 6` (other than the fact that it makes the value presumably a multiple of 64)? Also, shouldn't some kind of clamping be taking place to ensure that this the end result of the calculation is a multiple of a power of two, e.g. 16, 32, 64, etc? And as usual, got ministat :)? Thanks! -Garrett _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"