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

Re: Serious performance problems

Hi Buchan,

I have tested ldap performance with both slapcat and ldapsearch redirecting
the output to /dev/null. The searches returning lots of matches, take from
less than a second to three seconds max, which I guess it is the "expected"
performance. Performance decreases when output is shown on the screen,
though (which I find normal).
So the bottleneck seems to be apache+PHP. Actually, I am pretty sure about
this, since I have been watching slapd and apache processes and their CPU
consumption lately, and apache raises up to 99-100% when these ldap
searches are performed.
I know this might not be the place to ask, but if anyone has experienced
similar problems, please let me know.

Thank you for your time


             Buchan Milne                                                  
             lkomsa.net>                                              Para 
             25/04/2008 16:13                                           cc 
                                       Re: Serious performance problems    

On Friday 25 April 2008 11:28:44 Mikel.Santos@idom.com wrote:
> Hi guys,
> First of all, I would like to thank the community for such a great piece
> software and encourage the developers to keep up the good work.
> Until now, the setup of the ldap and the file configuration has been
> straightforward. The ldap was performing great with few entries, but
> got worse as the number of entries in the ldap increased.
> Currently we are experiencing serious performance problems when the
> searches performed exceed certain amount of entries. The "ldap_search"
> calls usually return after a few seconds but as the number of results
> matching the filter entered increases, the waiting time varies from one
> minute to many minutes.

This would appear to be a client-side problem. In my experience, the
performance (rate at which entries are returned, minus overhead of
setup) on an LDAP server will degrade as the number of entries in the
database increases, not as the number of entries returned increases
your cache is not interfering).

> The scenario is the following:
> *  We are accessing openldap via PHP function calls

I think you should test via some other method to ensure that PHP is not the

bottleneck. For example, maybe the amount of memory available to PHP is not

sufficient for the number of entries you are returning.

You can easily determine this by running the ldapsearch utility with
equivalent parameters to your php case. To eliminate any IO issues,
the results to /dev/null, e.g.:

$ time ldapsearch -x -D $binddn -b $basedn -w $pass -z $entries >/dev/null

(set the environment variables appropriately or replace them)

> * The number of entries in the ldap is close to 100.000
> * The hardware is the following: Intel(R) Xeon(TM) CPU 3.33GHz 1Gb RAM
> * The slapd.conf file is the following:
>**********************************/ modulepath      /usr/lib/ldap
> moduleload      back_bdb
> sizelimit -1
> tool-threads 1
> backend         bdb
> checkpoint 512 30
> database        bdb
> directory       "/var/lib/ldap"
> dbconfig set_cachesize 0 2097152 0
> cachesize       100000
> We have tried to increase both set_cachesize and cachesize (multiplying
> both by 100) and have not noticed a performance increase.
> I hope any of you can point us in the right direction since we are
> beginning to get desperated...

Unless you can reproduce the problem without php, I point you in the
of php ...