Fwd: Regression: ldb performance with indexes

Andrew Bartlett abartlet at samba.org
Wed May 29 00:37:17 UTC 2024


On Tue, 2024-05-28 at 13:56 +0200, Andreas Schneider via samba-
technical wrote:
> On Tuesday, 14 May 2024 16:31:53 GMT+2 Andreas Schneider via samba-
> technical wrote:
> > > Using a red black tree doesn't solve the issue:
> > > $ bash repro_dev_ldb.sh 10000 indexesRED BLACK TREERED BLACK
> > > TREERED BLACK TREEAdded 2 records successfullyRED BLACK TREEAdded
> > > 10000 records successfully
> > > real    0m9.299suser    0m9.212ssys     0m0.263s
> > > https://git.samba.org/?p=asn/samba.git;a=shortlog;h=refs/heads/asn-ldb
> > 
> > The thing is that those subtrees have 4 entries, with 10000 entries
> > we walk4x10000 so 40000.
> > This needs to be optimized. As dbwrap_rbt is similar to tdb we
> > share thesame problems. Those could be removed if a real rbtree is
> > used.
> > So someone with more ldb knowlege should look into this. I dunno if
> > wealways need all those 4 entries and are then overwriting stuff or
> > if wealways traverse those 4 entries but don't have too if we found
> > the one weneed.
> > With two rbtrees we could just push nodes from one tree to another.
> > It isjust pointer that should be fast. Allocating memory and
> > traversing isprobably what makes it so extremely slow.
> 
> Andrew,
> any comments?

I haven't looked into this all, my focus has been on trying to finish
some other work.
Sorry,
Andrew Bartlett

-- 
Andrew Bartlett (he/him)       https://samba.org/~abartlet/Samba Team Member (since 2001) https://samba.orgSamba Team Lead                https://catalyst.net.nz/services/sambaCatalyst.Net Ltd
Proudly developing Samba for Catalyst.Net Ltd - a Catalyst IT group
company
Samba Development and Support: https://catalyst.net.nz/services/samba
Catalyst IT - Expert Open Source Solutions


More information about the samba-technical mailing list