Hi,
I'm wondering, how I could restrict the memory usage of the slapd process.
We got a quite large amount of data (23 million entries) in our login ldap. Since we are still using OpenLDAP 2.0 and of course want to migrate now, I added our data into an OpenLDAP 2.3.37 (this version will be updated soon). The problem I stumble over is that while inserting the data with ldapadd (mainly to check the performance we have to expect in the future), the amount of memory the slapd uses endlessly grows. The slapd process uses 11GB of memory after the insert has finished.
We are using the BDB backend which is currently configured to use 4GB of shared memory.
Machine: Linux masterldap 2.6.21.5 #1 SMP Mon Jul 2 13:54:33 CEST 2007 x86_64 GNU/Linux, with 2 Dual-Core AMD Opteron(tm) Processor 2218 and 16GB of RAM.
slapd.conf (converted to cn=config format):
include /usr/local/our/ldap/etc/openldap/schema/core.schema include /usr/local/our/ldap/etc/openldap/schema/our.schema
pidfile /usr/local/our/ldap/var/ldap/run/slapd.pid argsfile /usr/local/our/ldap/var/ldap/run/slapd.args
# Load dynamic backend modules:
modulepath /usr/local/our/ldap/lib moduleload back_bdb.la
access to * by * write
loglevel 0 sizelimit 10000 timelimit 3600
cachesize 1000000 tool-threads 2
# backend definition backend bdb
database config rootdn "cn=root,cn=config" rootpw {SSHA}***
####################################################################### # BDB database definitions #######################################################################
# first database definition & config directives database bdb
directory /usr/local/our/ldap/var/ldap/openldap-data/ replogfile /usr/local/our/ldap/log/replica.log
suffix "o=our"
rootdn "cn=root,o=our" rootpw {SSHA}***
index cid eq index cn eq,sub index objectClass eq index folderName eq index locked eq
DB_CONFIG: set_flags DB_LOG_AUTOREMOVE set_cachesize 4 0 2 set_lg_max 524288000 set_lg_regionmax 512000 set_lg_bsize 268435456