From kdk@daleco.biz  Wed Jul  5 15:53:31 2006
Return-Path: <kdk@daleco.biz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1074516A5E0
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Jul 2006 15:53:31 +0000 (UTC)
	(envelope-from kdk@daleco.biz)
Received: from ezekiel.daleco.biz (southernuniform.com [66.76.92.18])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 98A1643D68
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Jul 2006 15:53:28 +0000 (GMT)
	(envelope-from kdk@daleco.biz)
Received: from archangel.daleco.biz ([69.27.149.254])
	by ezekiel.daleco.biz (8.13.4/8.13.1) with ESMTP id k65FqZ1Y047855
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 5 Jul 2006 10:52:57 -0500 (CDT)
	(envelope-from kdk@daleco.biz)
Received: from localhost (localhost [127.0.0.1])
	by archangel.daleco.biz (8.13.6/8.13.6) with ESMTP id k65FqOAe097398
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 5 Jul 2006 10:52:24 -0500 (CDT)
	(envelope-from kdk@daleco.biz)
Received: from archangel.daleco.biz ([127.0.0.1])
	by localhost (archangel.daleco.biz [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id iaMwZLVCOfD1 for <FreeBSD-gnats-submit@freebsd.org>;
	Wed,  5 Jul 2006 10:52:17 -0500 (CDT)
Received: from archangel.daleco.biz (localhost [127.0.0.1])
	by archangel.daleco.biz (8.13.6/8.13.6) with ESMTP id k65FiPCF097311
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 5 Jul 2006 10:44:25 -0500 (CDT)
	(envelope-from kadmin@archangel.daleco.biz)
Received: (from kadmin@localhost)
	by archangel.daleco.biz (8.13.6/8.13.6/Submit) id k65FiP2w097310;
	Wed, 5 Jul 2006 10:44:25 -0500 (CDT)
	(envelope-from kadmin)
Message-Id: <200607051544.k65FiP2w097310@archangel.daleco.biz>
Date: Wed, 5 Jul 2006 10:44:25 -0500 (CDT)
From: Kevin Kinsey <kdk@daleco.biz>
Reply-To: Kevin Kinsey <kdk@daleco.biz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Handbook "Config" chapter maxusers info outdated
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         99804
>Category:       docs
>Synopsis:       [PATCH] Handbook "Config" chapter maxusers info outdated
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    keramida
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 05 16:00:35 GMT 2006
>Closed-Date:    Wed Jul 12 11:19:49 GMT 2006
>Last-Modified:  Wed Jul 12 11:19:49 GMT 2006
>Originator:     Kevin Kinsey
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
DaleCo, S.P.
>Environment:
System: FreeBSD archangel.daleco.biz 6.1-STABLE FreeBSD 6.1-STABLE #2: Sat May 27 07:15:18 CDT 2006 root@archangel.daleco.biz:/usr/obj/backup/src/sys/GENERIC i386


>Description:

	Handbook reference 11.13.1.1 "kern.maxfiles" only seems to refer to
	pre-4.5 behavior in regard to "kern.maxusers" (e.g., it doesn't mention
	this at all, only the older "maxusers" kernel option).  This was creating
	a slight problem for a user this morning on the questions@ list.

	Also, since it is outdated, it doesn't agree with tuning(7).  I've used
	material from that manpage to produce the included patch.

>How-To-Repeat:

	Read the section above at:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-kernel-limits.html

	... and then try to find the "maxusers" option in your 6.X kernel config file ;-)

>Fix:

	Warning: IANAE on this (or much about kernels or SGML), but would this 
	patch (against EN) help, at least for the immediate future?

===== START =====

--- chapter.sgml.orig	Wed Jul  5 10:16:56 2006
+++ chapter.sgml	Wed Jul  5 10:29:51 2006
@@ -2022,8 +2022,8 @@
 	  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 dictated by 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,19 @@
           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 kern.maxusers 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 kern.maxusers may be individually overridden at boot-time or 
+	  run-time in /boot/loader.conf (see /boot/defaults/loader.conf for some hints) or
+	  as described elsewhere in this document.  Systems older than FreeBSD 4.4 must 
+	  set this value via the kernel 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


===== END ======

Sincerely, 

Kevin Kinsey
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->keramida 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Sat Jul 8 03:56:08 UTC 2006 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99804 
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Wed Jul 12 11:14:56 UTC 2006 
State-Changed-Why:  
A slightly modified version has been committed as: 

Revision  Changes    Path 
1.218     +20 -3     doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml 

Thanks :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99804 
>Unformatted:
