From owner-freebsd-bugs Tue Oct 31 12:10:03 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA20798 for bugs-outgoing; Tue, 31 Oct 1995 12:10:03 -0800 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA20792 ; Tue, 31 Oct 1995 12:10:01 -0800 Resent-Date: Tue, 31 Oct 1995 12:10:01 -0800 Resent-Message-Id: <199510312010.MAA20792@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, ylo@cs.hut.fi 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 ; 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 ); 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 Reply-To: ylo@cs.hut.fi To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/806: kernel default parameters need tuning Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 806 >Category: kern >Synopsis: kernel default parameters need tuning >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 31 12:10:00 PST 1995 >Last-Modified: >Originator: Tatu Ylonen >Organization: Helsinki University of Technology >Release: FreeBSD 2.1-STABLE i386 >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 >Audit-Trail: >Unformatted: