[PATCH] update the man pages for the prefork process model

Tim Beale timbeale at catalyst.net.nz
Mon Jan 28 23:07:02 UTC 2019

The samba man pages lack detail on how to enable the prefork process
model. It seems that Gary posted a patch to address this some time ago,
but this never ended up landing in master.

I've rebased his patch and tweaked the content ever so slightly. Review


-------------- next part --------------
From e0b3d730ed35cba79690c1a84e2c88e6b35490e1 Mon Sep 17 00:00:00 2001
From: Gary Lockyer <gary at catalyst.net.nz>
Date: Tue, 29 Jan 2019 11:34:31 +1300
Subject: [PATCH] man pages: document prefork process model

Document the process model options -M

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13765

Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Signed-off-by: Tim Beale <timbeale at catalyst.net.nz>
 docs-xml/manpages/samba.8.xml                | 35 ++++++++++++++++++++++++----
 docs-xml/smbdotconf/base/preforkchildren.xml |  4 +++-
 2 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/docs-xml/manpages/samba.8.xml b/docs-xml/manpages/samba.8.xml
index 529b687..0d542b2 100644
--- a/docs-xml/manpages/samba.8.xml
+++ b/docs-xml/manpages/samba.8.xml
@@ -101,14 +101,39 @@
-		<term>-M model</term>
+		<term>-M|--model</term>
 		<listitem><para>This parameter can be used to specify the
 		"process model" samba should use. This determines
 		how concurrent clients are handled. Available process
-		models include <emphasis>single</emphasis> (everything in
-		a single process), <emphasis>standard</emphasis> (similar
-		behaviour to that of Samba 3), <emphasis>thread</emphasis>
-		(single process, different threads.
+		models include:
+		<itemizedlist>
+			<listitem><para><emphasis>single</emphasis></para>
+			<para>All Samba services run in a single process. This is
+			not recommended for production configurations.
+			</para></listitem>
+			<listitem><para><emphasis>standard</emphasis></para>
+			<para>A process is created for each Samba service,
+			and for those services that support it (currently only
+			LDAP and NETLOGON) a new processes is started
+			for each new client connection.</para></listitem>
+			<listitem><para><emphasis>prefork</emphasis></para>
+			<para>A process is started for each Samba service, and a
+			fixed number of worker processes are started for those
+			services that support it (currently LDAP, NETLOGON, and KDC).
+			The client connections are then shared amongst the worker
+			processes.
+			Requests for services not supporting prefork are handled
+			by a single process for that service.</para>
+			<para>The number of prefork worker processes started is
+			controlled by the
+			<citerefentry><refentrytitle>smb.conf</refentrytitle>
+			<manvolnum>5</manvolnum></citerefentry> parameter
+		        <smbconfoption name="prefork children"/>,
+			which defaults to 4.
+			</para></listitem>
+		</itemizedlist>
diff --git a/docs-xml/smbdotconf/base/preforkchildren.xml b/docs-xml/smbdotconf/base/preforkchildren.xml
index ab13efc..1b9f8cf 100644
--- a/docs-xml/smbdotconf/base/preforkchildren.xml
+++ b/docs-xml/smbdotconf/base/preforkchildren.xml
@@ -4,7 +4,9 @@
 	<para>This option controls the number of worker processes that are
-		started for each service when prefork process model is enabled.
+		started for each service when prefork process model is enabled
+		(see <citerefentry><refentrytitle>samba</refentrytitle>
+			<manvolnum>8</manvolnum></citerefentry> -M)
 		The prefork children are only started for those services that
 		support prefork (currently ldap, kdc and netlogon).
 		For processes that don't support preforking all requests are

More information about the samba-technical mailing list