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

Re: caching magic

Igor Brezac wrote:

On Thu, 17 Jun 2004, Quanah Gibson-Mount wrote:

No, it goes in slapd.conf in OpenLDAP 2.2 or later.  It is documented in
the slapd-bdb manpage:

    shm_key <integer>
         Specify a key for a shared memory BDB  environment.  By
         default  the  BDB environment uses memory mapped files.
         If a non-zero value is specified, it will  be  used  as
         the  key  to  identify a shared memory region that will
         house the environment.

From my slapd.conf:

database bdb shm_key 5

This can go in DB_CONFIG:

No, that alone is not enough. If it were enough by itself, I would never have added this code to back-bdb. You also need to set the DB_SYSTEM_MEM flag when creating the environment, and this flag cannot be set in DB_CONFIG. Using the shm_key keyword tells back-bdb the key *and* tells it to set the flag when creating the environment.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support