source4 smbd prefork: Increase default worklers to 4
authorGary Lockyer <gary@catalyst.net.nz>
Wed, 5 Sep 2018 01:59:34 +0000 (13:59 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 7 Nov 2018 16:55:09 +0000 (17:55 +0100)
Increase the default number of worker processes started by the pre-fork
process model from 1 to 4.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
docs-xml/smbdotconf/base/preforkchildren.xml
lib/param/loadparm.c
source3/param/loadparm.c

index 720e43909cb05bdfe98dd512fdc7b790dfc7a0ca..ab13efce405cd021a0237a9a40b35faa8c101406 100644 (file)
@@ -6,9 +6,9 @@
        <para>This option controls the number of worker processes that are
                started for each service when prefork process model is enabled.
                The prefork children are only started for those services that
-               support prefork (currently only ldap). For processes that don't
-               support preforking all requests are handled by a single process
-               for that service.
+               support prefork (currently ldap, kdc and netlogon).
+               For processes that don't support preforking all requests are
+               handled by a single process for that service.
        </para>
 
        <para>This should be set to a small multiple of the number of CPU's
@@ -20,5 +20,5 @@
                worker processes.</para>
 </description>
 
-<value type="default">1</value>
+<value type="default">4</value>
 </samba:parameter>
index 1debcfff12788889771d3445fc40f0889e52d9b2..484c8913009b48dd772efaf6a9b3f3b9b0fc92e5 100644 (file)
@@ -2772,7 +2772,6 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
        lpcfg_do_global_parameter(lp_ctx, "tls certfile", "tls/cert.pem");
        lpcfg_do_global_parameter(lp_ctx, "tls cafile", "tls/ca.pem");
        lpcfg_do_global_parameter(lp_ctx, "tls priority", "NORMAL:-VERS-SSL3.0");
-       lpcfg_do_global_parameter(lp_ctx, "prefork children:smb", "4");
 
        lpcfg_do_global_parameter(lp_ctx, "rndc command", "/usr/sbin/rndc");
        lpcfg_do_global_parameter(lp_ctx, "nsupdate command", "/usr/bin/nsupdate -g");
@@ -2997,7 +2996,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
                                  "rpc server dynamic port range",
                                  "49152-65535");
 
-       lpcfg_do_global_parameter(lp_ctx, "prefork children", "1");
+       lpcfg_do_global_parameter(lp_ctx, "prefork children", "4");
 
        lpcfg_do_global_parameter(lp_ctx, "check parent directory delete on close", "no");
 
index 322934c55f09f03f2bbec7a818e6f9a2f3ad2130..495683083cbc763a79834898bd559d7eaf627d55 100644 (file)
@@ -957,7 +957,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
                         "49152-65535");
        Globals.rpc_low_port = SERVER_TCP_LOW_PORT;
        Globals.rpc_high_port = SERVER_TCP_HIGH_PORT;
-       Globals.prefork_children = 1;
+       Globals.prefork_children = 4;
 
        /* Now put back the settings that were set with lp_set_cmdline() */
        apply_lp_set_cmdline();