On Thursday, 1 September 2011 10:14:12 Thomas Rasmussen wrote:
On 31/08/2011, at 19.29, Quanah Gibson-Mount wrote:
> --On Wednesday, August 31, 2011 11:33 AM +0200 Thomas Rasmussen
>> After a restart and performing a ldapsearch slapd has
>> 500MB of memory, which is not exactly a good thing :-(
> How many total entries are in your database? What is your entrycache
> size? I don't see that information in your stripped slapd.conf.
> Personally, I suggest you never "strip" slapd.conf when sending it out,
> because you aren't necessarily going to know what is relevant to what
> you are doing.
I have about 3 million DNs in the database, I was required by our customer
to strip out some of the information, but it was only the 'access' bits
and the rootdn+rootpw which is why I stripped some information.
> I think you are misunderstanding some of how OpenLDAP works. In addition
> to the BDB cachesize (which you have configured as 50MB (which is likely
> grossly small given the size of your database), there are also 3
> additional caches for back-bdb/back-hdb in slapd itself. Those are
> *not* filled until you start doing searches. Those 3 caches are:
> dn cache
OK, I was not aware that it would use memory for other caches that wasn't
possible to setup (or are they?)
Have you read any documentation regarding tuning, at all?
$ man slapd-bdb|col -b|grep -A6 -E '^ *(idl|dn|)cache.*size'
Specify the size in entries of the in-memory entry cache main‐
tained by the bdb or hdb backend database instance. The default
is 1000 entries.
Specify the number of entries to free from the entry cache when
Specify the maximum number of DNs in the in-memory DN cache.
Ideally this cache should be large enough to contain the DNs of
every entry in the database. If set to a smaller value than the
cachesize it will be silently increased to equal the cachesize.
The default value is 0 which means unlimited, i.e. the DN cache
will grow without bound.
Specify the size of the in-memory index cache, in index slots.
The default is zero. A larger value will speed up frequent
searches of indexed entries. An hdb database needs a large idl‐
cachesize for good search performance, typically three times the
cachesize (entry cache size) or larger.