[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: Modify performance improvement for back-ldbm and back-bdb (ITS#1526)
> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> masarati@aero.polimi.it
> > I have improved the modify performance of OpenLDAP by only reindexing
> > attributes
> > that are actually changed in the modify operation instead of all
> the attributes
> > of
> > an entry. This change improves the performance of a modify operation on a
> > non-indexed
> > attribute from about 4 modifications per second to about 38
> modifications per
> > second.
> > If an indexed attribute is being modified, the results are a bit
> less dramatic,
> > but
> > still an improvement of about 200% is observed then.
> > Note: The changes are only applicable to the LDBM backend and the
> BDB backend.
> > As far
> > as I can see no other backends can use this optimisation.
>
> Your idea sounds definitely good; I'm not very comfortable with the
> fixed size array of index add/remove attrs. This may require a little
> reworking. I understand the improvement can be significant, though.
This may not be such a big issue. Currently back-bdb already has a hard-coded
limit of 128 indexed attrs. (See BDB_INDICES macro.) back-ldbm doesn't have
the same limitation, it can keep 128 indices open at once but is allowed to
use more (by closing the least-recently-used). However, there is no need for
it to use a second array, you can simply walk the mods list a second time,
checking for indexed attrs along the way.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support