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

RE: BDB backend memory consumtion



> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Claudio Jeker

> Hi,
>
> is it normal that the bdb backend uses an extreme amount of memory on 64bit
architectures?
> I have installed openldap-2.1.23 with db-4.1.25 on a OpenBSD sparc64 box.
> On this machine the test008-concurrency regression test with the bdb
> backend needs around 300MB of memory (ulimit -d or limit
> datasize) to be able to run.
>
> So I measured the memory consumtion on OpenBSD i386 and sparc64 for
> test008-concurrency.
>
> arch     | bdb    | ldbm
> ---------+--------+-------
> sparc64  | 290MB  | 43MB
> i386     |  70MB  | 34MB
>
> Now it is clear that a 64bit arch needs more memory but 4 times more!?
> Especially becasue the are just 19 entires in the ldif. How much memory
> will it need if I have a couple of thousand entries?

I believe the behavior you're seeing is specific to BSD. On Solaris my 64-bit
build shows slapd only using 35MB. On NetBSD I've seen slapd (32 bit) grow to
over 1GB running test008. I haven't tracked down where the memory is going,
but I'm pretty certain it's not being directly allocated by OpenLDAP code. In
these cases, the memory use seems proportional to the number of active
threads that slapd has spawned, so I suspect there's some inefficiency in the
BSD threads libraries.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support