[PATCH] Use prefork for more test environments
Andrew Bartlett
abartlet at samba.org
Thu May 24 03:28:43 UTC 2018
Samba's AD DC has had a prefork mode since Samba 4.8, but it is only
used in a small test environment. It consumes much less resources than
-M standard (when many LDAP clients are connected) but without the
single-thread downsides of -M single.
This patch changes two selftest environments to use it, ad_dc and
ad_dc_ntvfs.
Assuming this is stable in make test, I'll then propose we change the
default so our users can benefit. It also appears to make 'make test'
slightly faster (build_samba: 3:10 vs 3:25).
There is still a good place for -M standard, as while prefork is
enabled for LDAP, it isn't for NETLOGON (due to the internal RPC server
design), so some NTLM-heavy sites might prefer -M standard.
Please review and push.
CI: https://gitlab.com/catalyst-samba/samba/pipelines/22530483
Thanks,
Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
https://catalyst.net.nz/services/samba
-------------- next part --------------
From 96b4587e6308ffc5062b224d8aed9aa34a1c29b9 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Mon, 21 May 2018 09:41:43 +1200
Subject: [PATCH] selftest: Run ad_dc_ntvfs and ad_dc in prefork mode
This consumes far less resources due to less fork()ed children.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
---
selftest/target/Samba4.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 5353779292e..706cbf05a47 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -2204,7 +2204,7 @@ sub setup_ad_dc_ntvfs
my $env = $self->provision_ad_dc_ntvfs($path);
if (defined $env) {
- if (not defined($self->check_or_start($env, "standard"))) {
+ if (not defined($self->check_or_start($env, "prefork"))) {
warn("Failed to start ad_dc_ntvfs");
return undef;
}
@@ -2499,7 +2499,7 @@ sub setup_ad_dc
return undef;
}
- if (not defined($self->check_or_start($env, "single"))) {
+ if (not defined($self->check_or_start($env, "prefork"))) {
return undef;
}
--
2.11.0
More information about the samba-technical
mailing list