[WIP][PATCH] Improve tdb add/modify/delete loop perf by almost 20%

Andrew Bartlett abartlet at samba.org
Wed Jul 27 03:08:39 UTC 2016


On Tue, 2016-07-26 at 21:23 +0200, Stefan Metzmacher wrote:
> Hi Andrew,
> 
> I guess you have a logic bug in the following:
> 
> > +	if (ctx->unpack_flags &
> > LDB_UNPACK_DATA_FLAG_NO_DATA_ALLOC) {
> > +		struct ldb_val data_talloc = {
> > +			.data = talloc_memdup(ctx->msg,
> > +					      data.dptr,
> > +					      data.dsize),
> > +			.length = data.dsize
> > +		};
> 
> 
> I changed the logic a bit to make it more clear why we do a memdup()
> on LDB_UNPACK_DATA_FLAG_NO_DATA_ALLOC.
> 
> See
> https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/
> master-tmp
> 
> It has the version bumps for tdb, talloc, tevent and ldb ready to go
> for 4.5.0rc1.
> 
> Please push if you're happy with the result.

Done.  Hopefully I'm not racing with Amity and Martin for autobuild
queue space too much.  I've also run the patches to 70,000 cycles of
add/add-to-group/delete, and done other tests to clearly show that the
cache in my other mail isn't needed or helpful.  (Which is good!)

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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160727/ec216135/signature.sig>


More information about the samba-technical mailing list