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

RE: search / add operations suddenly became hopelessly slow



Hi Alexei,

The most likely cause of the symptoms you are describing is that you have
not tuned the Berkeley DB. I suggest you read the Sleepycat documentation
(http://www.sleepycat.com) that describes how to do this. There is also some
excellent tuning information in the OpenLDAP FAQ-o-Matic:

http://www.openldap.org/faq/data/cache/190.html

Finally, Google is an excellent resource. The following search terms yield
an excellent set of results:

OpenLDAP FAQ Tuning

(The terms "OpenLDAP faq" will favor the OpenLDAP FAQ-o-Matic)

Hope this helps,

Matthew Hardin
Symas Corporation
Packaged, certified, and supported LDAP software:
http://www.symas.net/download


> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org [mailto:owner-openldap-
> software@OpenLDAP.org] On Behalf Of Alexei Monastyrnyi
> Sent: Thursday, April 01, 2004 10:51 PM
> To: openldap-software@OpenLDAP.org
> Subject: Re: search / add operations suddenly became hopelessly slow
> 
> Hi List.
> 
> I posted the message below several days ago.
> I found workaround for the problem described, maybe not very smart one.
> Post
> it just in case if someone is interested.
> Dumping the whole DB with slapcat and loading it back with slapadd solved
> the problem.
> But I still have no understanding of what happened with DB... Any hints
> would be highly appreciated.
> 
> 
> Alexei.
> 
> ----- Original Message -----
> From: "Alexei Monastyrnyi" <alexeim@orcsoftware.com>
> To: <openldap-software@OpenLDAP.org>
> Sent: Wednesday, March 24, 2004 5:48 PM
> Subject: search / add operations suddenly became hopelessly slow
> 
> 
> > Hi List!
> > I've got a problem with search / add operations on OpenLDAP server
> (using
> > version 2.1.25 + BDB 4.1.25 on Solaris 9).
> >
> > The following operation with result in 20 lines takes 15 sec... which
> took
> > ten times less before.
> >
> > /usr/local/bin/ldapsearch -LLL -s one -b
> "ou=Group,dc=orcsoftware,dc=com"
> > "(cn=*)" dn | awk '{ print $2 }' > group.1~
> >
> > LDAP DB is not that big, maximum 500 items in ou=People, all the rest is
> > much smaller...
> >
> > I tried to reindex DB, still waiting for results... slapindex is being
> > running for 4 hours on such a small DB. truss shows that slapindex is
> doing
> > something with index files in openldap-data dir.
> >
> > I have the same OpenLDAP configuration on different server with the same
> DB
> > and it works like a dream.
> >
> > It worked perfectly before but one day it suddenly became slow. Nothing
> > critical was done no the system at that particular moment (recommended
> > patch_cluster was installed several days earlier but logs showed that
> was
> OK
> > with search/add operations timing several days after that).
> >
> > Turning on loglevel to -1 I can see big delay (7 sec) during the search
> > operation above.
> >
> > ...
> > Mar 24 15:40:32 ra slapd[23392]: [ID 934353 local4.debug] =>
> > bdb_filter_candidat
> > es
> > Mar 24 15:40:32 ra slapd[23392]: [ID 873669 local4.debug]       PRESENT
> > Mar 24 15:40:32 ra slapd[23392]: [ID 578218 local4.debug] =>
> > bdb_presence_candid
> > ates (cn)
> > Mar 24 15:40:33 ra slapd[23392]: [ID 336836 local4.debug] => key_read
> > Mar 24 15:40:33 ra slapd[23392]: [ID 187165 local4.debug]
> bdb_idl_fetch_key:
> > [00
> > 000001]
> > !!!!!!!!!!!!!!!! delay !!!!!!!!!!!!!!!!
> > Mar 24 15:40:40 ra slapd[23392]: [ID 766657 local4.debug] <=
> bdb_index_read
> > 1590
> >  candidates
> > Mar 24 15:40:40 ra slapd[23392]: [ID 366904 local4.debug] <=
> > bdb_presence_candid
> > ates: id=1590 first=9 last=23897
> > Mar 24 15:40:40 ra slapd[23392]: [ID 730587 local4.debug] <=
> > bdb_filter_candidat
> > es: id=1590 first=9 last=23897
> > ...
> >
> > I think there is some issue with database but cannot understand what is
> > wrong...
> >
> > Any hint would be highly appreciated.
> >
> > Sincerely,
> > Alexei Monastyrnyi,
> > System Engineer,
> > Orc Software AB.
> > Birger Jarlsgatan 32A Box 7742   Reception   +46 8 407 38 00
> > SE-103 95 Stockholm Sweden      Fax              +46 8 407 38 01
> > www.orcsoftware.com                 Direct          +46 8 407 38 02
> > alexeim@orcsoftware.com           Mobile        +46 70 377 5777
> >