Here is how to increase filedescriptors for FreeBSD

From: Torsten Sturm <>
Date: Wed, 22 Jan 1997 17:23:49 +0100

FreeBSD seems to present the simplest and most stable way to increase
Filedescriptors. Maybe this should make its way to the FAQ ? (Peter da Silva) wrote:
> > > How do I evaluate the maximum filedescriptors ?
> >
> > Do a "sysctl -a" and look at "kern.maxfilesperproc".

> Hello, thanks for your very quick response, it gets 360 file
> descriptors,
> which is exactly (10 MAXUSERS *16 +20 ) *2, as it is calculated in param.c.
> But how do I increase them savely ?

sysctl -w kern.maxfiles=XXXX
sysctl -w kern.maxfilesperproc=XXXX

You probably want maxfiles > maxfilesperproc if you're going to be pushing the

> What is the upper limit ?

I don't think there is a formal upper limit inside the kernel. All the data
structures are dynamically allocated. In practice there might be unintended
metaphenomena (kernel spending too much time searching tables, for example).

Torsten Sturm
Torsten Sturm AXIS information systems GmbH
     Internet Service Center | Internet Security Consulting
"But who will guard the guards themselves ?" -Satires,IV,JUVENAL
Received on Wed Jan 22 1997 - 08:33:31 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:09 MST