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

Re: restricting slapd memory consumption

On Monday 31 March 2008 11:21:15 Ralf Narozny wrote:
> 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 #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):
> cachesize       1000000

This belongs in the database section, I am not sure how it operates when set 
globally, but I doubt that after your 4GB of memory for BDB you will have 
sufficient memory to cache 1 million entries (although you would want to 
check what your entry size is when tuning this value).

However, since there is no way that you will cache your entire database in the 
entry cache, you should probably reduce it to a more reasonable working set, 
and ensure that you have sufficient BD cachesize.

/me notes that it would be nice to have more detail on the entry cache 
available via back-monitor, such as the number of entries in the cache, and 
the amount of entry cache that is used ...