replmd: Cache recycle-bin state to avoid DB lookup

Enterprise / Samba - Tim Beale [catalyst.net.nz] - 20 November 2018 07:40 EST

By caching the recycle-bin state we can save ~6% of the join time.

Checking whether the recycle-bin is enabled involves an underlying DSDB search. We do this ~4 times for each link we replicate (twice for the link source and target). By caching the recycle-bin's state over the duration of the replication, we can save 1000s of unnecessary DB searches.

With 5K users this makes the join time ~5 secs faster.

8b47443b871 replmd: Cache recycle-bin state to avoid DB lookup
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 34 ++++++++++++++++++++-----
1 file changed, 28 insertions(+), 6 deletions(-)

Upstream: gitweb.samba.org


  • Share