LDB_SCOPE_ONELEVEL without full traversal?

simo idra at samba.org
Wed Dec 6 21:53:18 GMT 2006


On Thu, 2006-12-07 at 08:38 +1100, tridge at samba.org wrote:
> Simo,
> 
>  > I think that, while the parentDN hack will certainly work, we should
>  > think of implementing it internally as one level searches are not so
>  > rare.
> 
> I disagree :-)
> 
> Can you tell me when a windows client does a one level search that
> needs to be fast? Have you measured how fast it currently is?

I don't have a specific windows use case yet, but I guess that on big
directories the difference will be evident.

>  > It will not really be an upgrade problem, all I have to do is to add a
>  > special index so that newer versions will just create this index if it
>  > is not found.
> 
> every additional index you add is one more write you need to do on
> every database modification.

This is true.

> One of the reasons ldb is so much faster than other ldap servers for
> the loads we have is that we don't do these sorts of performance
> enhancements for the less common cases. So we don't have prefix or
> suffix indexes, we don't have onelevel indexes etc.

We can delay the decision to add this stuff until we see if the common
cases require them.

>  > I will try to work on this in the weekend.
> 
> please first prove that it won't cost us more than a fraction of a %
> of performance. 

I will test the performance difference.

> By making this (rare!) onelevel case fast, I think you will
> significantly impact the performance of much more common operations.

The problem is: are one level searches really rare?
Can we check this in the traces we have?

> Tree traversals tend to be done by GUIs, and GUIs operate at human UI
> speed, which is _slow_. Expression searches are used by non-GUIs and
> those operate at protocol speeds, which is _fast_.

Human speed may be slow, but humans comply more then machines when they
have to wait too much ;-)

Volker,
how much do you think the fast we do a whole traverse is impacting your
searches speed? Is it something you find unacceptable?

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the samba-technical mailing list