[PATCH] Improve replication test speed by using immediate events

Stefan Metzmacher metze at samba.org
Fri Jul 21 06:30:39 UTC 2017


Am 21.07.2017 um 08:13 schrieb Andrew Bartlett:
> I was looking as why my nice, lovingly engineered patches to speed up
> the repl_move test, by avoiding fork() and the string2key cost (which
> showed up under perf) didn't really help!
> 
> So I looked at what the server does on a DsReplicaSync, and noticed
> that not only does it wait 1 second just for the heck of it, it will
> waste time and events trying to trigger outbound notifications, rather
> than getting on with pulling in changes. 
> 
> This is what has been making our replication tests so slow, and why the
> tests ran so much faster against Windows!
> 
> It is just a one-run sample but with this patch, on my laptop, also
> including my ccache patches:
> 
> TOP 10 slowest tests
> samba4.drs.repl_move.python(promoted_dc)(promoted_dc) -> 159
> samba4.drs.ridalloc_exop.python(vampire_dc)(vampire_dc) -> 96
> samba4.drs.repl_move.python(vampire_dc)(vampire_dc) -> 75
> samba4.nbt.winsreplication(ad_dc_ntvfs) -> 70
> samba4.drs.samba_tool_drs.python(promoted_dc)(promoted_dc:local) -> 59
> samba4.drs.samba_tool_drs.python(vampire_dc)(vampire_dc:local) -> 58
> samba4.drs.repl_schema.python(vampire_dc)(vampire_dc) -> 49
> samba4.drs.repl_schema.python(vampire_2000_dc)(vampire_2000_dc) -> 47
> samba4.krb5.kdc with account ALLOWED permission to replicate to an
> RODC(rodc) -> 43
> samba4.krb5.kdc with account DENIED permission to replicate to an
> RODC(rodc) -> 42
> 
> compared with just the ccache patches:
> 
> samba4.drs.repl_move.python(promoted_dc)(promoted_dc) -> 453
> samba4.drs.repl_move.python(vampire_dc)(vampire_dc) -> 373
> samba4.drs.repl_schema.python(vampire_dc)(vampire_dc) -> 188
> samba4.drs.repl_schema.python(promoted_dc)(promoted_dc) -> 151
> samba4.drs.ridalloc_exop.python(vampire_dc)(vampire_dc) -> 103
> samba4.drs.replica_sync.python(promoted_dc)(promoted_dc:local) -> 92
> samba4.drs.repl_schema.python(vampire_2000_dc)(vampire_2000_dc) -> 87
> samba4.drs.replica_sync.python(vampire_dc)(vampire_dc:local) -> 81
> samba4.drs.samba_tool_drs.python(vampire_dc)(vampire_dc:local) -> 81
> samba4.drs.samba_tool_drs.python(promoted_dc)(promoted_dc:local) -> 80
> 
> Overall time for make test TESTS="repl drs" dropped from 36min to 19min. 
> 
> I'll run a private autobuild with these, but in the meantime, please
> carefully review!
> 
> The whole set is at:
> 
> https://git.samba.org/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/faster-drs-krb5-ccache-p-im

We don't need to constantly call tevent_create_immediate(service),
we should do it only once on startup.

tevent_schedule_immediate() can be called again and again.

That way dreplsrv_pendingops_schedule_pull_now() don't
need to return WERROR, but void.

https://git.samba.org/?p=abartlet/samba.git/.git;a=commitdiff;h=3384c0d
can be pushed to master.

metze


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170721/12a4dee0/signature.sig>


More information about the samba-technical mailing list