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

Re: Fwd: adding support to mdb



--On Tuesday, January 15, 2013 3:21 PM -0200 Friedrich Locke <friedrich.locke@gmail.com> wrote:

Dear gentleman/madam,

as you may be aware i am having hard times trying to get qmail+ldap
working on my OpenBSD 5.2 amd64. While after installation OLDAP works
100% (I am using BDB as backend). When i start qmail, every query sent by
qmail to the OLDAP server increases memory up to a point OLDAP needs to
be restarted.

I emailed misc@openbsd.org. I got responses. Here i pass them to the
OLDAP developer: After some advice from Mr. Quanah, i gave up BDB and
would like to give MDB a try. Here is what i got from the misc@openbsd.org

Hi Friedrich,

As per Howard Chu (Author of MDB, Primary OpenLDAP Developer):

-------------------------------------------------------------
Full details are in the paper.
http://www.openldap.org/pub/hyc/mdm-paper.pdf

MDB assumes a unified buffer cache. See section 3.1, references 17, 18, and 19.

Note that this requirement can be relaxed in the current version of the library. If you create the environment with the MDB_WRITEMAP option then all reads and writes are performed using mmap, so the file buffer cache is irrelevant. Of course then you lose the protection that the read-only map offers.
-------------------------------------------------------------


I will note that I personally always set MDB_WRITEMAP in my deployments:
zimbra@zre-ldap002:~$ ldapsearch -LLL -x -H ldapi:/// -D cn=config -W -b "olcDatabase={2}mdb,cn=config" -s base olcDbEnvFlags

dn: olcDatabase={2}mdb,cn=config
olcDbEnvFlags: writemap
olcDbEnvFlags: nometasync

I do this as the protections you lose are still better than any guarantee one ever had with using BDB (possible loss of the most recent transaction).

--Quanah

--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration