s4-netlogon: Push the netlogon server in the AD DC into multiple processes
authorAndrew Bartlett <abartlet@samba.org>
Mon, 21 Nov 2016 00:31:39 +0000 (13:31 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 20 Dec 2016 00:11:23 +0000 (01:11 +0100)
This allows the NETLOGON server to scale better, as it is often a bottleneck

What we are doing here is keeping the forced single process only for
other servers that declare they use DCE/RPC handles.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/rpc_server/dcerpc_server.c

index 8ed9df5b0b4e45edba44369fe93ad51a82c9db7e..d77d52d7b89ca292229cdce5894cfce4b8f87a84 100644 (file)
@@ -275,6 +275,19 @@ _PUBLIC_ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
        char *ep_string = NULL;
        bool use_single_process = true;
        
+       /*
+        * If we are not using handles, there is no need for force
+        * this service into using a single process.
+        *
+        * However, due to the way we listen for RPC packets, we can
+        * only do this if we have a single service per pipe or TCP
+        * port, so we still force a single combined process for
+        * ncalrpc.
+        */
+       if (iface->flags & DCESRV_INTERFACE_FLAGS_HANDLES_NOT_USED) {
+               use_single_process = false;
+       }
+
        status = dcerpc_parse_binding(dce_ctx, ep_name, &binding);
 
        if (NT_STATUS_IS_ERR(status)) {