Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 1997 12:36:55 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@freebsd.org, jaykuri@oneway.com, questions@freebsd.org
Cc:        softweyr@xmission.com
Subject:   Re: Max open files per process, changing param.c
Message-ID:  <199702130136.MAA08127@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>	What, if any, ramifications will changing 'maxfiles' in param.c to
>increase max open files system-wide?

Don't change it in param.c.  Change it in /etc/rc.local using
`sysctl -w kern.maxfiles=nnnn'.  This shouldn't cause any problems except
increased memory usage.  You may want to increase kern.maxvnodes too.
Setting of these is broken in some old versions of FreeBSD-current.

>If 'maxfilesperproc' is different
>from 'maxfiles' will that cause any problems? 

None that can't be caused in other ways (except if it is too small, it
limits what can be done using setrlimit()).  maxfilesperproc will go
away soon.  login.conf handles limits better.

>Additionally, Will I run into other problems with regard to high file
>descriptor numbers?  I know that on Solaris (2.5 anyway) even though you

Yes, select() will break for fd's >= FD_SETSIZE (default 256).  The kernel
handles any number of fd's, but applications only handle ones up to
the value of FD_SETSIZE that they were compiled with.  Don't expect
to use standard or old applications if you set maxfilesperproc > 256).
The default may be increased to 1024 in future releases.

>can kick the max-open-files per process up to 2048, the FILE structure
>limits the file descriptor number to 1 byte, to 256 total.  Will I run
>into similar problems with FreeBSD? 

Not that one.

Bruce



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