[PATCH] ndr/pidl changes to improve search performance

Garming Sam garming at catalyst.net.nz
Tue Mar 8 02:49:17 UTC 2016


Hi,

We have been recently doing a bit of profiling on LDAP search
performance and found that ndr_token_retrieve_cmp_fn was taking quite a
large chunk of the time. This was an indication that there was a sizable
amount of tokens being stored during an ndr pull function as we have to
walk the list of tokens (performing the cmp function) to find our
particular token. In the security descriptor case, this meant walking
possibly ~100 tokens and the tokens were used mostly for recording the
switch values.

What we've done is try to reduce the amount of tokens added to the
linked list by simply adding checks to determine if the switch value is
necessary in some cases (and possibly removing the token). We've found
that this can improve general LDAP search performance by up to maybe 10%
(you'll have to ask Douglas for the actual figures).

There appears to be some other easy wins, which will hopefully come
later. The use of tokens for switch values might also have more room for
improvement, but where the time used to be spent in the comparison
function for pulling the security descriptor, any remaining time is now
mostly in talloc.



Cheers,

Garming
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ndr-patches.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160308/7839c5ac/ndr-patches.patch>


More information about the samba-technical mailing list