[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Resources - ldap VERY slow


Pierangelo Masarati wrote:
> If your db is large (many entries) it looks like you're searching
> on a non-indexed attribute. 
My db has about 100 entries now - each about 50 bytes and about 20
of some kbytes (Netscape Roaming)... slapcat produces a ldif-file of 
385 kbytes... That's not really large, not even for  a relatively 
"small" System like the one i'm using (P2-266 with 96MB Ram), is it?

> Carefully review your code and your queries.
Is it faster to read the whole subtree and filter on application-level,
or should read only one entry at a time?

> You may turn on debugging at level 256 and watch the filters submitted
> to the server for each query.
Querys are about 80 % like this
"SRCH Base = SomeBaseDN scope=1 filter =
the rest is 
"SRCH Base = SomeBaseDN scope=1 filter =
"SRCH Base = SomeBaseDN scope=1 filter =

> You may also try quering on a known entry with a filter on an attribute
> that is surely known to be indexed,  say "cn=your name" and see how
> fast it is.
Wow, thats fast! :-) Got 20 entries in 4 secs, including
time... seems to be an index problem then...

> If it works fine, then it is surely and index problem, so the server
> is behaving the best it can
How can I check my indexing? I have
index   objectClass eq 
index   cn,somespecialobject,anotherspecialobject pres,eq,sub
in slapd.conf and did "slapindex -f /path/to/slapd.conf" after that...
that shold be enough, or did I miss something?

> Pierangelo.

Thanks for your help

Timo Boettcher

I just added "index default pres,eq,sub" to my slapd.conf and did 
"slapindex -f /path/to/slapd.conf" after that... that cut the loading 
time of my php-html-page by 30% to 1 minute instead of 1:30 minutes... 
better, but still slow.