Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern.maxfiles / MAXFILES default value updated

Hi folks,

The default setting of the kern.maxfiles sysctl, indicating the maximum
number of files that may be open in the system, is controlled by the
maxusers kernel config option.  It is able to be explicitly configured
in your kernel config with "options MAXFILES=integer" as well as being
able to set a value on boot via /etc/sysctl.conf.  On systems with
larger amounts RAM the default value has long proven to be too low.

As a short term fix, if your system has 1GB of RAM or more the
kern.maxfiles default is now 10,000 files and with 16GB of RAM or more
the default is now 20,000 files.  Consequently if you've manually
configured your kern.maxfiles value, either via your kernel config file
or /etc/sysctl.conf, to a number equal to or smaller than these new
defaults you can remove that manual configuration if you desire.  Note
that a MAXFILES value explicitly configured in your kernel config file
will always override the default.

Longer term, I'll be looking at making a few of the default settings
(at least maximum number of files, processes and vnodes, maybe others)
scale better with RAM size.  If anyone has had the need to change any
of these, or indeed any other kernel tuneables, via their kernel config
file or /etc/sysctl.conf from their default values please let us know
the details (including your RAM size and general system usage type as
well as the tuneable values) as this will help shape future defaults.


Home | Main Index | Thread Index | Old Index