Discussion:
cn=config and DB_CONFIG
DT Piotr Wadas
2010-05-18 14:06:32 UTC
Permalink
Hello,
Is it possible with openldap, any version, to tune DB_CONFIG attributes
for selected context via cn=config ?

Regards,
DT
Howard Chu
2010-05-19 13:20:14 UTC
Permalink
Post by DT Piotr Wadas
Hello,
Is it possible with openldap, any version, to tune DB_CONFIG attributes
for selected context via cn=config ?
Every version since 2.3.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Hallvard B Furuseth
2010-05-19 13:56:41 UTC
Permalink
Post by DT Piotr Wadas
Is it possible with openldap, any version, to tune DB_CONFIG attributes
for selected context via cn=config ?
Yes. See the admin guide and the slapd-bdb(8) manpage, keyword
dbconfig. The cn=config attribute is called olcDbConfig. Note that
"The options set using this directive will only be written to the
DB_CONFIG file if no such file existed at server startup time"
Come to think of it, I don't know what happens if you modify an existing
database's DB_CONFIG; I've only used it with empty database directories.
--
Hallvard
Quanah Gibson-Mount
2010-05-19 19:21:06 UTC
Permalink
--On Wednesday, May 19, 2010 3:56 PM +0200 Hallvard B Furuseth
Post by Hallvard B Furuseth
Post by DT Piotr Wadas
Is it possible with openldap, any version, to tune DB_CONFIG attributes
for selected context via cn=config ?
Yes. See the admin guide and the slapd-bdb(8) manpage, keyword
dbconfig. The cn=config attribute is called olcDbConfig. Note that
"The options set using this directive will only be written to the
DB_CONFIG file if no such file existed at server startup time"
Come to think of it, I don't know what happens if you modify an existing
database's DB_CONFIG; I've only used it with empty database directories.
It will pull in the changes the next time slapd is started.

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Howard Chu
2010-05-20 07:31:54 UTC
Permalink
Post by Hallvard B Furuseth
Post by DT Piotr Wadas
Is it possible with openldap, any version, to tune DB_CONFIG attributes
for selected context via cn=config ?
Yes. See the admin guide and the slapd-bdb(8) manpage, keyword
dbconfig. The cn=config attribute is called olcDbConfig. Note that
"The options set using this directive will only be written to the
DB_CONFIG file if no such file existed at server startup time"
Come to think of it, I don't know what happens if you modify an existing
database's DB_CONFIG; I've only used it with empty database directories.
If you ldapmodify via cn=config the DB environment will be closed and
re-opened to make the new settings take effect.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Daniel
2010-05-19 13:10:30 UTC
Permalink
Post by DT Piotr Wadas
Is it possible with openldap, any version, to tune DB_CONFIG attributes
for selected context via cn=config ?
Although I don't know in detail if and when these kind of cn=config
settings will take effect (especially for changes), it seems to be
supported:

Have a look at admin guide 2.4 and olcDBConfig attribute:
http://www.openldap.org/doc/admin24/slapdconf2.html#BDB%20and%20HDB%20Database%20Directives


BTW: Could someone confirm, that a slaptest -f -F conversion does not
effect (aka ignores) slapd's bdb DB_CONFIG convenience settings like for
example:

dbconfig set_cachesize 0 500000000 4
dbconfig set_lg_dir /extra/harddrive4performace
dbconfig set_lg_regionmax 5000000
dbconfig set_lg_bsize 5000000
dbconfig set_lg_max 25000000
dbconfig set_flags DB_LOG_AUTOREMOVE


In my case the above settings are contained in a "database hdb" section
and although slaptest -f succeeds after running slaptest -f ... -F ...
slapd.d's ldifs do not contain any olcDBConfig attribute.

Thanks!

Cheers
Daniel
Loading...