summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2002-01-25 01:54:16 +0000
committerdillon <dillon@FreeBSD.org>2002-01-25 01:54:16 +0000
commite1e10af6b7defe0ef41501e760e967b72106de5e (patch)
treed6f8d71cefbbec06d3b1c72ca531d5fdf3bf2bc1 /sys/kern
parent43a0f944771685958c3d48095717b5aaa2b7bad9 (diff)
downloadFreeBSD-src-e1e10af6b7defe0ef41501e760e967b72106de5e.zip
FreeBSD-src-e1e10af6b7defe0ef41501e760e967b72106de5e.tar.gz
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
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_param.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 4d47f0f..2dc6f5b 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -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);
OpenPOWER on IntegriCloud