Bug 85733

Summary: [patch] FAQ should point to /boot/loader.conf for changing kern.maxproc
Product: Documentation Reporter: Brian Candler <B.Candler>
Component: Books & ArticlesAssignee: Remko Lodder <remko>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Brian Candler 2005-09-05 09:50:18 UTC
http://www.freebsd.org/doc/faq/troubleshoot.html#PROC-TABLE-FULL

says:

  "If your machine is lightly loaded, and you are simply running a very
   large number of processes, you can adjust this with the kern.maxproc
   sysctl.
   ...
   To make a sysctl permanent across reboots, set this in
   /etc/sysctl.conf in recent versions of FreeBSD, or /etc/rc.local in
   older versions."

However, this particular tunable needs to be set in /boot/loader.conf and
requires a reboot.

It's true that attempting to make the change manually tells you this:

   # sysctl kern.maxproc=2000
   sysctl: oid 'kern.maxproc' is a read only tunable
   sysctl: Tunable values are set in /boot/loader.conf

However, readers of this document might be inclined just to put a setting in
/etc/sysctl.conf, and then find it doesn't work.

Fix: 

Refer to /boot/loader.conf, and/or cross-reference to
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-sysctl.html

(Personally I don't know a way to tell whether sysctl variable X is a
/boot/loader.conf tunable or an /etc/sysctl.conf frob other than trying to
change it. If there's a better way, please document that too :-)
Comment 1 Daniel Gerzo 2005-09-24 13:13:26 UTC
I think this should be proper diff:

--- book.sgml.orig	Sat Sep 24 12:58:51 2005
+++ book.sgml	Sat Sep 24 14:09:07 2005
@@ -3313,8 +3313,12 @@
 
           <para>If your machine is lightly loaded, and you are simply
             running a very large number of processes, you can adjust
-            this with the <varname>kern.maxproc</varname> sysctl.  If
-            these processes are being run by a single user, you will
+            this with the <varname>kern.maxproc</varname> tunable.  If
+            you want to adjust this tunable, you will need to set this
+            in <filename>/boot/loader.conf</filename> and reboot.  For
+            more information about tuning tunables, you should see the
+            &man.loader.conf.5; and &man.sysctl.conf.5; manual pages.
+            If these processes are being run by a single user, you will
             also need to adjust <varname>kern.maxprocperuid</varname>
             to be one less than your new
             <varname>kern.maxproc</varname> value.  (It must be at
@@ -3322,9 +3326,10 @@
             must always be running.)</para>
 
           <para>To make a sysctl permanent across reboots, set this in
-            <filename>/etc/sysctl.conf</filename> in recent versions
-            of FreeBSD, or <filename>/etc/rc.local</filename> in older
-            versions.</para>
+            <filename>/etc/sysctl.conf</filename>.  More information
+            about tuning with sysctl can be found at <ulink
+            url="&url.books.handbook;/configtuning-sysctl.html">Tuning
+            with sysctl</ulink> section of the Handbook.</para>
         </answer>
       </qandaentry>
 

-- 
Sincerely,
   Daniel Gerzo
Comment 2 Remko Lodder freebsd_committer freebsd_triage 2005-09-24 20:34:21 UTC
Responsible Changed
From-To: freebsd-doc->remko

I will make this happen
Comment 3 Remko Lodder freebsd_committer freebsd_triage 2005-12-26 14:40:20 UTC
State Changed
From-To: open->closed

I committed a slightly modified patch to the FAQ. 
It should appear within 24 hours from now. 
Thanks for the notice and submission!