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

Re: DB_Config



Craig White wrote:
I inherited an OpenLDAP server that is in production use and it suffers
from a lack of knowledge and I am slowly trying to remedy that.

One of the things I noticed was that it complained at startup about the
lack of a DB_Config and a caution about it being slow ? which it
definitely seems to be.

As this server is in production use, I am not allowed to do anything to
impact it without thorough testing ? which I think I have done.

Does anyone see any problems if I just drop the following DB_Config file
in a data directory so the next time the server is restarted, it takes
effect? (Yes, it?s a DBD configuration)

# cat DB_CONFIG

set_cachesize           0 10485760 1

set_lg_regionmax        1048576

set_lg_max              10485760

set_lg_bsize            2097152

set_lg_dir              /var/tmp/bdb-log

You cannot change the log directory of an already existing DB installation, unless you also move all of the logfiles to the new location before starting up.

set_flags               DB_LOG_AUTOREMOVE

Seems safe and I do back it up regularly but if I drop the file in the
data directory, I may not be watching when the server is patched/restarted.

If you simply drop this in and restart the server, it will die on startup due to the logdir change.

Comments?

In 2.4 you can use the dbconfig directive in slapd.conf to keep all of the BDB directives in one place. That simplifies things a bit, particularly if you're in the habit of rm'ing the entire data directory to start over, you don't lose your BDB tunings.

Meanwhile, BDB is deprecated. You should migrate to LMDB at your earliest opportunity. The BDB-based code will still be present, but disabled by default in 2.5, and will be deleted in OpenLDAP 2.6.

Thanks Craig



--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/