kern.maxfiles formula?

Kris Kennaway kris at
Sun Jan 2 02:44:19 PST 2005

On Sun, Jan 02, 2005 at 01:18:56AM -0800, Lucky Green wrote:
> I am running FreeBSD 5.3 on a dual CPU system with 1 GB of RAM with under a
> dozen of very active users and a few rather active processes. The system
> keeps running out of FDs, causing any number of problems, such as preventing
> ssh logins.
> sysctl kern.maxfiles shows a maximum of 12328 FDs. My kernel config file has
> "maxusers" set to 0, which means the kern.maxfiles limit must be the OS
> default.
> What is the maximum number of FDs that can be set on a system with 1 GB of
> RAM? What would it be for 2 GB of RAM? In other words, how many FDs can a
> FreeBSD 5.3 system safely support for each GB of RAM?

A truly enormous number :-) You just need to increase the value of
kern.maxfiles in /boot/loader.conf as appropriate for your workload.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list