From ylo@cs.hut.fi  Tue Oct 31 12:02:33 1995
Received: from hutcs.cs.hut.fi (root@hutcs.cs.hut.fi [130.233.192.2])
          by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id MAA20469
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 31 Oct 1995 12:02:31 -0800
Received: from soikko.cs.hut.fi (hutcs.cs.hut.fi) by hutcs.cs.hut.fi with SMTP id AA02159
  (5.65c8/HUTCS-S 1.4 for <FreeBSD-gnats-submit@freebsd.org>); Tue, 31 Oct 1995 22:02:19 +0200
Received: (from ylo@localhost) by soikko.cs.hut.fi (8.6.12/8.6.9) id NAA00388; Tue, 31 Oct 1995 13:29:39 +0100
Message-Id: <199510311229.NAA00388@soikko.cs.hut.fi>
Date: Tue, 31 Oct 1995 13:29:39 +0100
From: Tatu Ylonen <ylo@cs.hut.fi>
Reply-To: ylo@cs.hut.fi
To: FreeBSD-gnats-submit@freebsd.org
Subject: kernel default parameters need tuning
X-Send-Pr-Version: 3.2

>Number:         806
>Category:       kern
>Synopsis:       kernel default parameters need tuning
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 31 12:10:00 PST 1995
>Closed-Date:    Thu Apr 18 15:53:06 PDT 1996
>Last-Modified:  Thu Apr 18 15:53:53 PDT 1996
>Originator:     Tatu Ylonen
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
Helsinki University of Technology
>Environment:

	i486/100, 24M memory, 4GB disk

>Description:

	The default kernel configuration parameters (such as maxusers)
	are absurdly low - not sufficient even for a single user.
	Also, default resource limits are absurdly low.  This is an
	environment where the system is used mostly as a personal workstation,
	running only a few processes at a time, but some of the
	processes can be very big.

	More precisely, the default "maxusers" value is 20, which I
	raised to 40 before even trying to do anything.  Even then, I soon
	run out of processes when trying to compile two programs in different
	windows (at least one of them with -j3).  When I reconfigured
	to maxusers=100, the BSS size of the kernel grew by 3kB.  This
	is a wrong place to save.  (I am not sure if dynamic
	allocation grew and by how much.)

	The default soft limit for the number of processes per user
	appears to be 40 even though the hard limit is 1619.
	This is completely absurd and confusing for the users.  Why not make
	the default limit, say, half of the process table size?

	I have configured 200 megabytes of swap.  For some reason the
	hard limit for process data size is 128M.  I am afraid this
	will not be sufficient (I may need to add more swap anyway).  Why is
	the hard limit on process size so low?

	Why is the size of the resident set soft limit by default 10M?
	Why is the system unable to use more than about 13M of memory for the
	single process even after increasing the limit, when the only other
	processes running are a few standard daemons, one shell, and one top?
	Only the big process and the "top" were doing anything.  (The
	particular system had 24M of memory, of which 22M was shown as
	available on boot..)

>How-To-Repeat:
>Fix:
	
	Adjust the limits and their initialization code.

	My suggestion for the limits and defaults would be the following:
	  maxusers		64
	  maxproc		max(hard limit / 2, 200)
	  soft datasize		max(0.75 * swap size, swap size - 32M)
	  hard datasize 	swap size
	  soft stacksize	8M
	  hard stacksize	swap size
	  memoryuse		unlimited

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: scrappy 
State-Changed-When: Thu Apr 18 15:53:06 PDT 1996 
State-Changed-Why:  
Supersceded by kern/971 
>Unformatted:
