Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Dec 1997 23:52:19 +0100 (MET)
From:      j@uriah.heep.sax.de (J Wunsch)
To:        freebsd-current@freebsd.org
Cc:        <ircadmin@shellnet.co.uk>
Subject:   Re: Where can I get help ?
Message-ID:  <199712092252.XAA04600@uriah.heep.sax.de>
In-Reply-To: <348AE151.4190@shellnet.co.uk>
References:  <348AE151.4190@shellnet.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
"Steven Fletcher (Shellnet IRC administrator)" <ircadmin@shellnet.co.uk> wrote:

> I need some help on compiling a kernel with 1024 file descriptor
> blocks .... which I have little idead on how to do.

First, you should realize the actual number is a resource limit.  See
the `limit' (csh) or `ulimit' (sh) shell builtins for documentation.

My current limits look like:

j@uriah 439% limit -h descriptors
descriptors     680 

(That's the `hard' limit.)

This number is NPROC*2, with NPROC being computed in /sys/conf/param.c
as 20 + 16 * MAXUSERS.  So basically, by bumping `maxusers' (in your
kernel config file) to (1024 / 2 - 20) / 16 (= 30.75 :-), you'd get a
default of 1024.

Actually, you can change it at runtime using sysctl, it's the sysctl
variable kern.maxfilesperproc (you probably want kern.maxfiles to be
larger then).  Thus, no kernel recompilation needed.  (Disclaimer: i
don't know offhand when this tunable variable has been introduced, so
it depends on your FreeBSD version.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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