Joao Amancio | 6 Oct 23:24

Low performance on searches

Hi people,

First of all: "I'm new to OpenLDAP..."
The problem is:
Every search on the base take several time and sometimes (not so rare) returns a "time out" message.
I don't know if the problem is in the app query or if it's in configuration files.

When I run the 'db_stat -m' command, the results are:

320MB 740B      Total cache size
1           Number of caches
320MB 8KB       Pool individual cache size
0           Maximum memory-mapped file size
0           Maximum open file descriptors
0           Maximum sequential buffer writes
0           Sleep after writing maximum sequential buffers
0           Requested pages mapped into the process' address space
542724      Requested pages found in the cache (99%)
20          Requested pages not found in the cache
463         Pages created in the cache
20          Pages read into the cache


Based on the official OpenLDAP documentation, the values in red are great and so I've made no change on file DB_CONFIG.
My slapd.conf is set as follow:

include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/inetorgperson.schema
include         /usr/local/etc/openldap/schema/nis.schema
include         /usr/local/etc/openldap/schema/samba.schema
pidfile         /usr/local/var/run/slapd.pid
argsfile        /usr/local/var/run/slapd.args
database        bdb
suffix          "dc=bluefish,dc=com,dc=br"
rootdn          "cn=Manager,dc=bluefish,dc=com,dc=br"
rootpw          secret
directory       /usr/local/var/openldap-data
index   objectClass     eq
index cn,sn,givenname,mail,uid eq
index entryCSN,entryUUID eq
access to dn.base="cn=Manager,o=Bluefish"
      by peername.regex=127\.0\.0\.1 auth
      by peername.regex=192\.168\.0\.100 auth
      by peername.regex=192\.168\.0\.135 auth
      by peername.regex=192\.168\.0\.32 auth
      by peername.regex=192\.168\.0\.35 auth
      by peername.regex=192\.168\.0\.37 auth
      by users none
      by * none
access to attrs=userPassword,sambaLMPassword,sambaNTPassword
      by self write
      by anonymous auth
      by * read


Could anyone help me to determine where is the problem for getting "time out" message on searches?

Server configuration:
Intel Core2 Quad 2.40Ghz
2 GB RAM
1 HD - 250 GB SATAII (everything is here)

Thanks for any kind of help,
João Ferreira


Re: Low performance on searches

--On Monday, October 06, 2008 6:26 PM -0300 Joao Amancio 
<jjamancio@...> wrote:

>
> Hi people,
>
> First of all: "I'm new to OpenLDAP..."

Please provide the OpenLDAP release you are using.  I also do not see any 
cachesize settings in the slapd.conf file.

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Favicon

Re: Low performance on searches

Quanah Gibson-Mount writes:
> Please provide the OpenLDAP release you are using.  I also do not see any 
> cachesize settings in the slapd.conf file.

...and an example of a search which takes long time.  (filter, basedn,
scope, alias dereferencing.)  If the search follows aliases and your
database contains a lot of alias entries, each alias must be followed to
check the aliased entry - thus aliases defeat indexing.

The output from loglevel 256 (the default loglevel) may also be
informative.  To make syslog log what openldap sends, you put
something like
	local4.*    /var/log/openldap.log
in syslog.conf - and set up logrotate to rotate the log.  Or
just run slapd with the -d256 option to log to stderr.

--

-- 
Hallvard


Gmane