[Date Prev][Date Next]
Re: Resources - ldap VERY slow
Timo Boettcher wrote:
> Hi all!
> I'm running a openldap (2.0.7) server - together with a webserver and a
> dhcp-server - on a machine of the following configuration CPU: P2-266,
> RAM: 96MB. For 15 Querys for single Objects (no searches) with about
> 50 bytes of data per object via html-php-ldap, it takes 1:30 (one and a
> half) minutes for the html-page to load.
> "top" tells me that the slapd-processes (which seem to be the problem
> here - please correct me if not) are making about 90% CPU-Load
> during these querys.
> 17:18:07 up 40 days, 23:56, 14 users, load average: 0.63, 0.28, 0.16
> 99 processes: 93 sleeping, 3 running, 3 zombie, 0 stopped
> CPU states: 98.8% user, 0.8% system, 0.0% nice, 0.4% idle
> Mem: 94304K total, 79584K used, 14720K free, 568K buffers
> Swap: 248968K total, 50584K used, 198384K free, 44252K cached
> PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
> 26699 root 10 0 2008 1992 852 S 42.1 2.1 1:02 slapd
> 27040 root 18 0 2008 1992 852 R 21.1 2.1 0:54 slapd
> 25201 root 9 0 2008 1992 852 S 18.4 2.1 1:36 slapd
> 26683 root 9 0 2008 1992 852 S 15.8 2.1 1:16 slapd
> 21593 www 9 0 3108 2944 2552 S 0.3 3.1 0:14 httpd
> My Indexes are:
> index objectClass pres,eq
> index cn,myobject1,myobject2,myobject3 pres,eq,sub
> Since this system is only used for testing-purposes and has rarely more
> then 2 users on the ldap-server, the hardware should be enough,
> shouldn't it?
> I don't know where to start searching for the problem...
> In my opinion, it could be either of these:
> - PHP-coding
> - Index not ok
> - not enough RAM
> - to slow CPU
> Perhaps somebody could give me a hint where to start searching...
> Sorry for the long message
> Thanks for your help
If your db is large (many entries) it looks like you're searching
on a non-indexed attribute. Carefully review your code and your queries.
You may turn on debugging at level 256 and watch the filters submitted
to the server for each query. You may also try quering on a known entry
with a filter on an attribute that is surely known to be indexed,
say "cn=your name" and see how fast it is. If it works fine, then it is
surely and index problem, so the server is behaving the best it can
Dr. Pierangelo Masarati | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale | fax: +39 02 2399 8334
Politecnico di Milano | mailto:email@example.com
via La Masa 34, 20156 Milano, Italy |