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

OpenLDAP Memory Usage



Hello all,

I'm experiencing some problems with some OpenLDAP servers: the slapd
process seems to always use more memory, eventually reaching a point
where it has consumed all the available server memory and is killed by
the OOM killer. The servers have 32gb of memory plus 32gb of swap
space and are running Debian Lenny (with kernel 2.6.26-2-amd64), and
we have compiled OpenLDAP 2.4.23 from source, and we're using Berkeley
DB 4.6. The servers are dedicated to running OpenLDAP, so they don't
have other processes that use a significant amount of memory.

This is a relatively high-volume environment, with 4 servers running
with mirrormode to enable multi-master replication. The current
database size is about 900mb. Is there any setting that could limit
this memory usage? I don't feel this is "normal" considering our DB
size and cache sizes.

These are my slapd.conf and DB_CONFIG files:

--------------------------------- slapd.conf ---------------------------------
disallow        bind_anon
require         authc

#== Schemas snipped ==

pidfile         /usr/local/openldap/var/run/slapd.pid
argsfile        /usr/local/openldap/var/run/slapd.args

loglevel        16640

modulepath      /usr/local/openldap/lib/ldap/
moduleload      back_bdb
moduleload      ppolicy
moduleload	syncprov

threads 	8

database        config
rootdn          "cn=admin,cn=config"
rootpw          {SSHA}PASS

database        monitor
rootdn          "cn=admin,cn=monitor"
rootpw          {SSHA}PASS

database 	  bdb
suffix          "dc=corpldap,dc=mycompany"
rootdn          "cn=admin,dc=corpldap,dc=mycompany"
rootpw          {SSHA}PASS

directory       /usr/local/openldap/var/corpldap-mycompany-data
overlay         ppolicy
overlay         syncprov
ppolicy_hash_cleartext
syncprov-checkpoint 100 10
syncprov-sessionlog 100
monitoring      on
lastmod         on

checkpoint      512 10

cachesize       200000
idlcachesize    600000

#== Indexes and ACLs snipped ==

serverid 1
syncrepl rid=002
	provider="ldap://server02:389";
	searchbase="dc=corpldap,dc=mycompany"
	type="refreshAndPersist"
	retry="30 10 60 15 600 +"
	bindmethod=simple
	binddn="cn=repuser3,ou=replica,dc=corpldap,dc=mycompany"
	credentials="PASSWORD"

#== other syncrepl entries snipped

mirrormode on


--------------------------------- DB_CONFIG ---------------------------------

set_lg_max              10485760
set_lg_regionmax        1048576
set_lg_bsize            2097152
set_lg_dir /var/ldap/corpldap-mycompany-log
set_flags DB_LOG_AUTOREMOVE
set_cachesize 0 2073741824 0
set_lk_max_objects 5000
set_lk_max_locks 5000
set_lk_max_lockers 5000



-- 
Diego Lima
http://www.diegolima.org