[turba] Re: LDAP scope

Edwin L. Culp eculp at encontacto.net
Tue Feb 22 08:22:48 PST 2005


Quoting Craig White <craigwhite at azapple.com>:


>> How significant would the difference between -s one and the above -b which I
>> assume would only be one level?  Not much, I bet.  It could very well
>> be that I
>> don't understand the -s [one|sub|base] options.
> ----
> the idea is that this server is doing other things than ldap
> lookup/authentication etc.
>
> If I do a search and I am searching a base that has let's say, 30
> entries but each of those entries has sub entries, each with maybe
> 10-100 entries, then a simple search that I only need/want the base
> search of 30 entries, ends up searching say an average of 50 entries X
> 30 users or 1500 entries, you can imagine how the wasted cycles
> multiply. Searching 1500+30 entries only to turn around and filter the
> 1500 possible entries out of the returned values isn't a very efficient
> way to do things.
>
> Even worse, if I use the same type of lookup for my MTA to determine
> whether to accept mail for local delivery, and I am getting a lot of
> email each day, that would be a lot of wasted lookups. Thus, I have to
> contain those lookups to a scope of 'one' or 'onelevel' as it seems to
> be referred to these days.
>
> Obviously, I can lessen the impact of all this by tuning the ldap
> cachesize to try to keep them all in a cache (memory permitting).
>
> Of course, you can create separate containers for each type of Address
> Book and restructure the ACL's but it's much simpler for me to manage if
> I have the user's personal address book containers inside the users own
> space itself and I have to deal with applications that just want to sub
> search everything.

Craig, thanks for the explanation.  I understand your issue much 
better, now.  I
tested it on my tree that is very flat with different results.

I'll add that I liked your idea of changing ldap_search for ldap_list 
and as I'm
sure you know, is working great.  Thanks for that tip, too.

I'm really starting to enjoy your posts and fresh viewpoint.  You've actually
made me think a little. ;)

Have a great day,

ed






More information about the turba mailing list