samba: Change default process model to prefork
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 30 Jan 2019 23:08:00 +0000 (12:08 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 1 Feb 2019 02:36:16 +0000 (03:36 +0100)
Prefork is the more sensible default option now, as it better
handles a large number of client connections.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
WHATSNEW.txt
docs-xml/manpages/samba.8.xml
source4/smbd/server.c

index a3ed9213d50281cc2c980461082ece20447aa5d8..85c417a61a9386dd3bde6c0ef404116c13207c3f 100644 (file)
@@ -16,6 +16,19 @@ UPGRADING
 NEW FEATURES/CHANGES
 ====================
 
+Default samba process model
+---------------------------
+
+The default for the --model argument passed to the samba executable has changed
+from 'standard' to 'prefork'. This means a difference in the number of samba
+child processes that are created to handle client connections. The previous
+default would create a separate process for every LDAP or NETLOGON client
+connection. For a network with a lot of persistent client connections, this
+could result in significant memory overhead.  Now, with the new default of
+'prefork', the LDAP, NETLOGON, and KDC services will create a fixed number of
+worker processes at startup and share the client connections amongst these
+workers. The number of worker processes can be configured by the 'prefork
+children' setting in the smb.conf (the default is 4).
 
 REMOVED FEATURES
 ================
index 0d542b2fbc86d924c59eb597b62fbef757bf8858..8d548d85fddf39abfd4a2d7303e95ae53daa0c63 100644 (file)
                        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
+                       <para>The default. 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.
index cf860491c1ab75eae1467d477ce10af960a36463..ea421b3bd68811ed8e4fe4163b6241a7e2946061 100644 (file)
@@ -452,7 +452,7 @@ static int binary_smbd_main(const char *binary_name,
        init_module_fn *shared_init;
        uint16_t stdin_event_flags;
        NTSTATUS status;
-       const char *model = "standard";
+       const char *model = "prefork";
        int max_runtime = 0;
        struct stat st;
        enum {