Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 1997 14:32:43 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        imp@village.org, msmith@atrad.adelaide.edu.au
Cc:        hackers@FreeBSD.org
Subject:   Re: Cannot fork
Message-ID:  <199701220332.OAA32470@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Any ideas on how I might track down this problem?  I'm rebuilding my
>> kernel now with MAX_CHILDREN set to be 256 rather than whatever the

MAX_CHILDREN is not an option.  You probably mean CHILD_MAX.
CHILD_MAX should never have been an option and now has no effect in
-current.  Limits are now set according to data in /etc/login.conf.

Some of the limits are too small.  I just hit the 8MB filesize limit
when I tried to run `iozone 16'.  This limit used to be broken (running
a subprocess used to increase the limit to RLIM_INFINITY) so the problem
wasn't evident.  `su' to root to change the limits gave even smaller
limits initially:

`default' limits after login:
cpu time               (seconds, -t)  unlimited
file size           (512-blocks, -f)  16384       <- too small
data seg size           (kbytes, -d)  16384
stack size              (kbytes, -s)  2048        <- too small
core file size      (512-blocks, -c)  16384
max memory size         (kbytes, -m)  30720
locked memory           (kbytes, -l)  10240
max user processes              (-u)  64
open files                      (-n)  64

`standard' limits after su:
cpu time               (seconds, -t)  5400        <- smaller
file size           (512-blocks, -f)  16384
data seg size           (kbytes, -d)  8192        <- smaller
stack size              (kbytes, -s)  2048
core file size      (512-blocks, -c)  16384
max memory size         (kbytes, -m)  8192        <- smaller
locked memory           (kbytes, -l)  4096        <- smaller
max user processes              (-u)  32          <- smaller
open files                      (-n)  24          <- smaller

>What does 'limit maxproc' say?  I usually raise it to 200 or so in
>my .xsession; the default of 40 or so is very tight for heavy X work.

This now only works for root, since login.conf specifies that the
hard limits and the soft limits are set to the same (often small)
values.

Class `xuser' has slightly larger limits.

I think that only the soft limits should be restricted for trusted
interactive users, and most of the soft limits should be about twice
as large (same as the old non-bogus kernel defaults for the non-X
case).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701220332.OAA32470>