>I have managed to get a top snap shot of when a user sends mail to all users :
>11382 root       9   0 48028  46M  4096 S    12.2  4.6   0:28 slapd
>14097 root       9   0 48028  46M  4096 S    11.6  4.6   0:24 slapd
>13996 root       9   0 48028  46M  4096 S    11.6  4.6   0:23 slapd
> 5188 root       9   0 48028  46M  4096 S    11.5  4.6   0:32 slapd
<snip>
>.... the list goes on and on and on with loads of slapd's that are not being 
>used, I have about 200 threads, which is what it is set to in my slapd.cong file.

200 threads doesn't mean anything bad, it just means that's how many
processes are _available_ to be used.  If they're sitting there idle,
it's not a problem.

>As you can see, my processor usage shoots through the roof!
>Can anyone tell me what is happening here? Is this normal?

No, it's not normal.  It means that the daemon (probably) is having to
search the entire directory because the mail server is trying to lookup
a value from some attribute that is not indexed.  This is probably a bit
of overkill, but this is what I index on my qmail-ldap:

# Indices to maintain
index cn,sn,uid pres,eq
index mail,mailAlternateAddress eq
index objectClass eq

Another note.  If you have an index defined for "mailAlternateAddress",
but none of your entries have a value for the mailAlternateAddress, then
no index has been created.  If no index is found, the server searches
the entire directory for the information (symptoms that your directory
access is showing).  Add the entry that it's searching for to one of
your users, shut down the ldap server, run slapindex, then restart the
server.  Now repeat your test.  I actually added a user named "dummy"
and put a value in the attribute that was missing from all the rest.  
That solved all problems.  Note that I didn't have to reindex.  That's
because I added the ldif using ldapadd instead of slapadd.  Doing it
that way (ie online) makes slapd create the indexes that it needs.

I am unaware if the recent versions of openldap will actually create a
null index for those attributes that don't have any values in any of the
entries in the directory.
-- 
Blue skies...   Todd    Public key: http://www.mrball.net/todd.asc
...and I will strike down upon thee with great vengeance and furious
 anger, those who attempt to poison and destroy my binaries, and you 
    will know my name is root, when I lay my vengeance upon you.

Attachment: msg03207/pgp00000.pgp
Description: PGP signature

Reply via email to