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

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 of
> software and encourage the developers to keep up the good work.
> Until now, the setup of the ldap and the file configuration has been pretty
> straightforward. The ldap was performing great with few entries, but things
> 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 connection 
setup) on an LDAP server will degrade as the number of entries in the 
database increases, not as the number of entries returned increases (assuming 
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, redirect 
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 direction 
of php ...