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

Re: 2.1.17 performance issues

Howard Chu wrote:

The SleepyCat configuration mechanism is also very well developed. But not
only is it redundant for us to integrate it into slapd, it is potentially
dangerous, and my position has been to put as little BDB-specific
configuration into slapd as possible. The problem is this - the BDB library
always reads the DB_CONFIG file after all other configuration is done, and
any settings in the DB_CONFIG file override anything that was set before. So,
if we were to provide slapd.conf keywords for all of the necessary BDB
tunables, you may run into situations where your carefully chosen settings
are completely ignored by the BDB library.

To clear things up in my mind that means that if you put in slapd.conf: cachesize 1000 and in the database directory a DB_CONFIG with: set_cachesize 0 8192000 1

The latest will be taken and "cachesize 1000" will always be ignore ?
In that case, why allowing BDB tunning in slapd.conf, just forget about it, and tell people to only use a DB_CONFIG file !?

The BDB settings are persistent; when the BDB environment is created the
settings remain in the environment forever, unless db_recover is run to
destroy/recreate it.

Again to clear things up, if you set a DB_CONFIG file with a certain cachesize and no sync:
set_flags DB_TXN_NOSYNC
set_cachesize 0 8192000 1

initiate your directory with a slapdadd ( I use set_flags DB_TXN_NOSYNC at this stage to accelarate directory initialisation ) , then comment #set_flags DB_TXN_NOSYNC in DB_CONFIG and finally start slapd, will the BDB do the sync or not ?
Same thing with cachesize, after slapdadd , can I dynamically increase it by changing the value in set_cachesize 0 8192000 1 and reload slapd or do I need to detroy db file and reinitite with slapdadd ?

This "The BDB settings are persistent" confuses me ....

Thanks .

Here's where it gets dangerous - the BDB environment is
created by the first BDB application to touch a database. If the first
application is not from OpenLDAP (slapd/slapadd/etc.), (e.g., if you used
db_load or some other BDB utility) then the environment and databases will be
created with default settings that are probably inappropriate for slapd's
use. The only way to guarantee that the default settings that slapd requires
are loaded correctly, is to put them in the DB_CONFIG file where *every*
application will be forced to use them. The alternative is to tell you never
to use SleepyCat's BDB utilities with a slapd database, which would be
completely impractical - you *need* db_stat to tell you how the BDB
environment is performing, you *need* db_archive to tell you which log files
can be removed, etc. etc...

The bottom line - because the back-bdb databases must be managed by both the
OpenLDAP tools and the SleepyCat tools, we must use the SleepyCat DB_CONFIG
file in addition to slapd.conf.

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