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

Re: memory leak, or 'normal' behaviour?





--On Monday, March 15, 2004 5:30 PM +0100 Pierangelo Masarati <ando@sys-net.it> wrote:

Sure.  I didn't expect it to be so bad...  anyway apparently
there are other people reporting at least leaks.  I wouldn't
bother too much about it, except that I see people restarting
the server overnight or even closer.

Ando,

I've always seen growth in slapd. Part of the reason one can see growth is the other libraries that do not belong to OpenLDAP that get loaded (cyrus-sasl, heimdal, MIT kerb, BDB, OpenSSL, etc). If any of those libraries have their own memory leaks, slapd will "inherit" them. Howard Chu spent a bit of time working on this for Stanford back in 2002 when we hired Symas, and cleaned up a large number of leaks in other vendors code. The question is, of course, if those vendors have introduced more leaks since that time.

On my production systems which are heavily used:

slapd resident size is: 1,428 MB
slapd virtual size is : 2,185 MB

We put a threshold of 2 GB resident and 3 GB virtual as a point in which to issue a warning to us.

On my test systems, which are virtually unused:

slapd resident size is: 138 MB
slapd virtual size is : 2079 MB

IIRC, another part of why slapd "grows" is the various cache's used by slapd (ACL, idl, etc). As a system is more vigorously used, the more the cache's can (and will) be used, which means that slapd will grow to accommodate that growth.

Note that I never hit my thresholds, and thus never receive warnings. I think it is important to note that a slapd process that is used can grow to approximately 10 times the size of an unused process, so one should give allowance for this type of thing.

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/TSS/Computing Systems
ITSS/TSS/Infrastructure Operations
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html