[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFC] OpenLDAP automatic upgrade

Torsten Landschoff <torsten@debian.org> writes:

> Hi Quanah, 
> On Thu, Mar 17, 2005 at 03:39:09PM -0800, Quanah Gibson-Mount wrote:
>> > Is there a way to enforce this without editing DB_CONFIG? I'd rather set
>> > an environment variable or something like that. Writing that into
>> > DB_CONFIG in the maintainer scripts always poses the risk that it'll
>> > stay.
>> Well.... This will be available in OpenLDAP 2.3 via the "-q" option to
>> slapadd.  I have my own backported patch to OpenLDAP 2.2 that enables the
>> "-q" option.

> Care to share that patch? :)


You can find the patch for adding "-q" to slapadd on OpenLDAP 2.2 here:


I've been reading back over my notes on the problems OpenLDAP has with BDB
4.3, and I believe that this patch will resolve those issues as well (as
long as it is used to load a DB, rather than without the "-q" flag).

The main issue is that the way BDB 4.3 creates transaction logs in the
quickload scenario is to use


That particular function when combined with how OpenLDAP loads data often
results in the server running out of memory, and the entire environment
becoming corrupted.  The "-q" patch completely disables the creation of
any logs by either BDB 4.2 or BDB 4.3, and significantly decreases the
amount of time it takes to load a database.

I would note that it would likely be good for Debian to still include a
DB_CONFIG file in the database directory it creates with its OpenLDAP
distribution, as the default settings from Sleepycat are entirely too

Here are some examples.  All examples use:

10k entry LDIF file
23 attributes indexed
BDB 4.2.52
"database bdb" as the slapd.conf database

1) DB_CONFIG file with a 384MB cache, and normal slapadd options.

   ldap-linux0:/db/DBs# time slapadd -l 10k.ldif
   30.760u 1.800s 0:36.89 88.2%    0+0k 0+0io 13351pf+0w

2) DB_CONFIG file with a 384MB cache, and disabling logging via the BDB 4.2.52 flags.

   ldap-linux0:/db/DBs# time slapadd -l 10k.ldif
   26.790u 0.410s 0:27.35 99.4%    0+0k 0+0io 13318pf+0w

3) DB_CONFIG file with a 384MB cache and using the "-q" option to slapadd.

   ldap-linux0:/db/DBs# time slapadd -q -l 10k.ldif
   17.270u 0.450s 0:17.88 99.1%    0+0k 0+0io 13221pf+0w

4) no DB_CONFIG file and normal slapadd options. Note that this is Debian's current default method.

   ldap-linux0:/db/DBs# time slapadd -l 10k.ldif
   38.920u 26.830s 13:30.39 8.1%  0+0k 0+0io 732pf+0w

5) no DB_CONFIG file and using the "-q" option to slapadd.

    ldap-linux0:/db/DBs# time slapadd -q -l 10k.ldif
    25.470u 21.070s 0:50.10 92.8%   0+0k 0+0io 627pf+0w


Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

Reply to: