[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
FW: Modify performance improvement for back-ldbm and back-bdb (ITS#1526)
I think this is a good idea as well, but I have a couple alternate ideas.
First, we could introduce a "flags" field in the Attribute structure, with
#define SLAPD_ATTR_IXADD 0x01
#define SLAPD_ATTR_IXDEL 0x02
and set these flags on the attrs as we find them in the modify. Seems pretty
clean and simple.
As another possibility, we can simply break the attr lists onto separate lists
as the modify proceeds. save_attrs would be broken out onto save_attr_del for
deleted indexed attrs, and likewise e->e_attrs would be broken out onto
e_attr_add for added indexed attrs. The separated lists can be easily rejoined
at the end
of the operation, but their order would not be preserved. Of course we claim no
guarantees on attribute order as it is, but the current code tends to preserve
it.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support
-----Original Message-----
From: owner-openldap-bugs@OpenLDAP.org
[mailto:owner-openldap-bugs@OpenLDAP.org] On Behalf Of
masarati@aero.polimi.it
> Full_Name: Gertjan van Wingerde
> 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.
Pierangelo