Make the 'maxusers 0' auto-sizing code slightly more conservative. Change

from 1 megabyte of ram per user to 2 megabytes of ram per user, and
reduce the cap from 512 to 384.  512 leaves around 240 MB of KVM available
while 384 leaves 270 MB of KVM available.  Available KVM is important
in order to deal with zalloc and kernel malloc area growth.

Reviewed by:	mckusick
MFC: either before 4.5 if re's agree, or after 4.5
This commit is contained in:
Matthew Dillon 2002-01-25 01:54:16 +00:00
parent f7a54d06e5
commit 4fbd563eb8

View File

@ -134,11 +134,11 @@ init_param2(int physpages)
/* Base parameters */
if ((maxusers = MAXUSERS) == 0) {
maxusers = physpages / (1024 * 1024 / PAGE_SIZE);
maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE);
if (maxusers < 32)
maxusers = 32;
if (maxusers > 512)
maxusers = 512;
if (maxusers > 384)
maxusers = 384;
}
TUNABLE_INT_FETCH("kern.maxusers", &maxusers);