On Saturday 29 June 2002 6:45 am, Todd Lyons wrote: > >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.
I have been told before on the list that the indexes are probably the problem, but I have had difficulty pin-pointing exactly why - you have just confirmed that sure enough its the indexes. I am going to do some serious playing with it today, but I have a quick question : I read somewhere that the indexes are only created when you add entires, thus for me to index my current LDAP I would have to export it to an ldif file, alter my indicies, and then add all my data again. Is this still correct? Or does the stopping the server and slapindex do the trick now - I sure hope so, it a pain having to export all the data, I am always worried that I will loose something! -- Thanks Andrew McCall Internet System Administrator I.C.T. Division Oldham MBC Civic Centre West Street Oldham OL1 1UU Tel : 0161 911 3990 Fax : 0161 911 3998 Email : [EMAIL PROTECTED] ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.oldham.gov.uk **********************************************************************
