Document kern.maxfile' and kern.maxusers' auto-tuning.

PR:		docs/99804
Submitted by:	Kevin Kinsey <kdk@daleco.biz>
This commit is contained in:
Giorgos Keramidas 2006-07-12 11:18:26 +00:00
parent cc2a284275
commit e7ec7e7093
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=28263

View file

@ -2022,8 +2022,8 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
require many thousands of file descriptors, depending on the
kind and number of services running concurrently.</para>
<para><varname>kern.maxfile</varname>'s default value is
dictated by the <option>maxusers</option> option in your
<para>In older FreeBSD releases, <varname>kern.maxfile</varname>'s default
value is derived from the <option>maxusers</option> option in your
kernel configuration file. <varname>kern.maxfiles</varname> grows
proportionally to the value of <option>maxusers</option>. When
compiling a custom kernel, it is a good idea to set this kernel
@ -2033,7 +2033,24 @@ device_probe_and_attach: cbb0 attach returned 12</screen>
connected at once, the resources needed may be similar to a
high-scale web server.</para>
<para>The system will auto-tune
<para>As of FreeBSD 4.5, <varname>kern.maxusers</varname> is
automatically sized at boot based on the amount of memory available
in the system, and may be determined at run-time by inspecting the
value of the read-only <varname>kern.maxusers</varname> sysctl.
Some sites will require larger or smaller values of
<varname>kern.maxusers</varname> and may set it as a loader tunable;
values of 64, 128, and 256 are not uncommon. We do not recommend
going above 256 unless you need a huge number of file descriptors;
many of the tunable values set to their defaults by
<varname>kern.maxusers</varname> may be individually overridden at
boot-time or run-time in <filename>/boot/loader.conf</filename> (see
the &man.loader.conf.5; man page or the
<filename>/boot/defaults/loader.conf</filename> file for some hints)
or as described elsewhere in this document. Systems older than
FreeBSD&nbsp;4.4 must set this value via the kernel &man.config.8;
option <option>maxusers</option> instead.</para>
<para>In older releases, the system will auto-tune
<literal>maxusers</literal> for you if you explicitly set it to
<literal>0</literal><footnote>
<para>The auto-tuning algorithm sets