Home | History | Annotate | Line # | Download | only in man
      1  1.5      tron .lf 1 stdin
      2  1.6  christos .TH SLAPD-BDB 5 "2020/04/28" "OpenLDAP 2.4.50"
      3  1.6  christos .\" Copyright 1998-2020 The OpenLDAP Foundation All Rights Reserved.
      4  1.1     lukem .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
      5  1.5      tron .\" $OpenLDAP$
      6  1.1     lukem .SH NAME
      7  1.3     lukem slapd\-bdb, slapd\-hdb \- Berkeley DB backends to slapd
      8  1.1     lukem .SH SYNOPSIS
      9  1.1     lukem .B /etc/openldap/slapd.conf
     10  1.1     lukem .SH DESCRIPTION
     11  1.1     lukem The \fBbdb\fP backend to
     12  1.1     lukem .BR slapd (8)
     13  1.5      tron uses the Oracle Berkeley DB (BDB) package to store data.
     14  1.1     lukem It makes extensive use of indexing and caching to speed data access.
     15  1.1     lukem .LP
     16  1.6  christos Note that BDB is deprecated and support will be dropped in future
     17  1.6  christos OpenLDAP releases. Installations should use the \fBmdb\fP
     18  1.6  christos backend instead.
     19  1.6  christos .LP
     20  1.6  christos \fBhdb\fP is a variant of
     21  1.5      tron the \fBbdb\fP backend that uses a hierarchical database layout which
     22  1.5      tron supports subtree renames. It is both more space-efficient and more
     23  1.5      tron execution-efficient than the \fBbdb\fP backend.  It is otherwise identical
     24  1.5      tron to the \fBbdb\fP behavior, and all the same configuration options apply.
     25  1.1     lukem .LP
     26  1.1     lukem It is noted that these options are intended to complement
     27  1.1     lukem Berkeley DB configuration options set in the environment's
     28  1.1     lukem .B DB_CONFIG
     29  1.1     lukem file.  See Berkeley DB documentation for details on
     30  1.1     lukem .B DB_CONFIG
     31  1.1     lukem configuration options.
     32  1.1     lukem Where there is overlap, settings in
     33  1.1     lukem .B DB_CONFIG
     34  1.1     lukem take precedence.
     35  1.1     lukem .SH CONFIGURATION
     36  1.1     lukem These
     37  1.1     lukem .B slapd.conf
     38  1.1     lukem options apply to the \fBbdb\fP and \fBhdb\fP backend database.
     39  1.1     lukem That is, they must follow a "database bdb" or "database hdb" line and
     40  1.1     lukem come before any subsequent "backend" or "database" lines.
     41  1.1     lukem Other database options are described in the
     42  1.1     lukem .BR slapd.conf (5)
     43  1.1     lukem manual page.
     44  1.1     lukem .TP
     45  1.1     lukem .BI cachesize \ <integer>
     46  1.1     lukem Specify the size in entries of the in-memory entry cache maintained 
     47  1.1     lukem by the \fBbdb\fP or \fBhdb\fP backend database instance.
     48  1.1     lukem The default is 1000 entries.
     49  1.1     lukem .TP
     50  1.1     lukem .BI cachefree \ <integer>
     51  1.1     lukem Specify the number of entries to free from the entry cache when the
     52  1.1     lukem cache reaches the \fBcachesize\fP limit.
     53  1.1     lukem The default is 1 entry.
     54  1.1     lukem .TP
     55  1.1     lukem .BI checkpoint \ <kbyte>\ <min>
     56  1.1     lukem Specify the frequency for checkpointing the database transaction log.
     57  1.1     lukem A checkpoint operation flushes the database buffers to disk and writes
     58  1.1     lukem a checkpoint record in the log.
     59  1.1     lukem The checkpoint will occur if either \fI<kbyte>\fP data has been written or
     60  1.1     lukem \fI<min>\fP minutes have passed since the last checkpoint.
     61  1.1     lukem Both arguments default to zero, in which case they are ignored. When
     62  1.1     lukem the \fI<min>\fP argument is non-zero, an internal task will run every 
     63  1.1     lukem \fI<min>\fP minutes to perform the checkpoint.
     64  1.1     lukem See the Berkeley DB reference guide for more details.
     65  1.1     lukem .TP
     66  1.3     lukem .B checksum
     67  1.3     lukem Enable checksum validation of DB pages whenever they are read from disk.
     68  1.3     lukem This setting can only be configured before any database files are created.
     69  1.3     lukem .TP
     70  1.1     lukem .BI cryptfile \ <file>
     71  1.1     lukem Specify the pathname of a file containing an encryption key to use for
     72  1.1     lukem encrypting the database. Encryption is performed using Berkeley DB's
     73  1.1     lukem implementation of AES. Note that encryption can only be configured before
     74  1.1     lukem any database files are created, and changing the key can only be done
     75  1.1     lukem after destroying the current database and recreating it. Encryption is
     76  1.1     lukem not enabled by default, and some distributions of Berkeley DB do not
     77  1.1     lukem support encryption.
     78  1.1     lukem .TP
     79  1.1     lukem .BI cryptkey \ <key>
     80  1.1     lukem Specify an encryption key to use for encrypting the database. This option
     81  1.1     lukem may be used when a separate
     82  1.1     lukem .I cryptfile
     83  1.1     lukem is not desired. Only one of
     84  1.1     lukem .B cryptkey
     85  1.1     lukem or
     86  1.1     lukem .B cryptfile
     87  1.1     lukem may be configured.
     88  1.1     lukem .TP
     89  1.3     lukem .BI dbconfig \ <Berkeley-DB-setting>
     90  1.1     lukem Specify a configuration directive to be placed in the
     91  1.1     lukem .B DB_CONFIG
     92  1.1     lukem file of the database directory. The
     93  1.1     lukem .B dbconfig
     94  1.1     lukem directive is just a convenience
     95  1.1     lukem to allow all necessary configuration to be set in the
     96  1.1     lukem .B slapd.conf
     97  1.1     lukem file.
     98  1.1     lukem The options set using this directive will only be written to the 
     99  1.1     lukem .B DB_CONFIG
    100  1.1     lukem file if no such file existed at server startup time, otherwise
    101  1.1     lukem they are completely ignored. This allows one
    102  1.1     lukem to set initial values without overwriting/destroying a 
    103  1.1     lukem .B DB_CONFIG 
    104  1.1     lukem file that was already customized through other means. 
    105  1.1     lukem This directive may be specified multiple times, as needed. 
    106  1.1     lukem For example:
    107  1.1     lukem .RS
    108  1.1     lukem .nf
    109  1.1     lukem 	dbconfig set_cachesize 0 1048576 0
    110  1.1     lukem 	dbconfig set_lg_bsize 2097152
    111  1.1     lukem .fi
    112  1.1     lukem .RE
    113  1.1     lukem .TP
    114  1.1     lukem .B dbnosync
    115  1.1     lukem Specify that on-disk database contents should not be immediately
    116  1.1     lukem synchronized with in memory changes.
    117  1.1     lukem Enabling this option may improve performance at the expense of data
    118  1.1     lukem security.
    119  1.1     lukem See the Berkeley DB reference guide for more details.
    120  1.1     lukem .TP
    121  1.3     lukem \fBdbpagesize \fR \fI<dbfile> <size>\fR
    122  1.3     lukem Specify the page size to use for a particular database file, in units
    123  1.3     lukem of 1024 bytes. The default for the
    124  1.3     lukem .B id2entry
    125  1.3     lukem file is 16, the default for all other files depends on the size of the
    126  1.3     lukem underlying filesystem's block size (typically 4 or 8).
    127  1.3     lukem The maximum that BerkeleyDB supports is 64. This
    128  1.3     lukem setting usually should not need to be changed, but if BerkeleyDB's
    129  1.3     lukem "db_stat \-d" shows a large amount of overflow pages in use in a file,
    130  1.3     lukem setting a larger size may increase performance at the expense of
    131  1.3     lukem data integrity. This setting only takes effect when a database is
    132  1.3     lukem being newly created. See the Berkeley DB reference guide for more details.
    133  1.3     lukem .TP
    134  1.1     lukem .BI directory \ <directory>
    135  1.1     lukem Specify the directory where the BDB files containing this database and
    136  1.1     lukem associated indexes live.
    137  1.1     lukem A separate directory must be specified for each database.
    138  1.1     lukem The default is
    139  1.3     lukem .BR /var/openldap/openldap\-data .
    140  1.1     lukem .TP
    141  1.1     lukem .B dirtyread
    142  1.1     lukem Allow reads of modified but not yet committed data.
    143  1.1     lukem Usually transactions are isolated to prevent other operations from
    144  1.1     lukem accessing uncommitted data.
    145  1.1     lukem This option may improve performance, but may also return inconsistent
    146  1.1     lukem results if the data comes from a transaction that is later aborted.
    147  1.1     lukem In this case, the modified data is discarded and a subsequent search
    148  1.1     lukem will return a different result.
    149  1.1     lukem .TP
    150  1.1     lukem .BI dncachesize \ <integer>
    151  1.3     lukem Specify the maximum number of DNs in the in-memory DN cache.
    152  1.3     lukem Ideally this cache should be
    153  1.3     lukem large enough to contain the DNs of every entry in the database. If
    154  1.3     lukem set to a smaller value than the \fBcachesize\fP it will be silently
    155  1.3     lukem increased to equal the \fBcachesize\fP. The default value is 0 which
    156  1.3     lukem means unlimited, i.e. the DN cache will grow without bound.
    157  1.3     lukem 
    158  1.3     lukem It should be noted that the \fBDN cache\fP is allowed to temporarily
    159  1.3     lukem grow beyond the configured size. It does this if many entries are 
    160  1.3     lukem locked when it tries to do a purge, because that means they're
    161  1.3     lukem legitimately in use. Also, the \fBDN cache\fP never purges entries
    162  1.3     lukem that have cached children, so depending on the shape of the DIT, it 
    163  1.3     lukem could have lots of cached DNs over the defined limit.
    164  1.1     lukem .TP
    165  1.1     lukem .BI idlcachesize \ <integer>
    166  1.1     lukem Specify the size of the in-memory index cache, in index slots. The
    167  1.1     lukem default is zero. A larger value will speed up frequent searches of
    168  1.1     lukem indexed entries. An \fBhdb\fP database needs a large \fBidlcachesize\fP
    169  1.1     lukem for good search performance, typically three times the 
    170  1.1     lukem .B cachesize
    171  1.1     lukem (entry cache size)
    172  1.1     lukem or larger.
    173  1.1     lukem .TP
    174  1.1     lukem \fBindex \fR{\fI<attrlist>\fR|\fBdefault\fR} [\fBpres\fR,\fBeq\fR,\fBapprox\fR,\fBsub\fR,\fI<special>\fR]
    175  1.1     lukem Specify the indexes to maintain for the given attribute (or
    176  1.1     lukem list of attributes).
    177  1.1     lukem Some attributes only support a subset of indexes.
    178  1.1     lukem If only an \fI<attr>\fP is given, the indices specified for \fBdefault\fR
    179  1.1     lukem are maintained.
    180  1.1     lukem Note that setting a default does not imply that all attributes will be
    181  1.1     lukem indexed. Also, for best performance, an
    182  1.1     lukem .B eq
    183  1.1     lukem index should always be configured for the
    184  1.1     lukem .B objectClass
    185  1.1     lukem attribute.
    186  1.1     lukem 
    187  1.1     lukem A number of special index parameters may be specified.
    188  1.1     lukem The index type
    189  1.1     lukem .B sub
    190  1.1     lukem can be decomposed into
    191  1.1     lukem .BR subinitial ,
    192  1.1     lukem .BR subany ,\ and
    193  1.1     lukem .B subfinal
    194  1.1     lukem indices.
    195  1.1     lukem The special type
    196  1.1     lukem .B nolang
    197  1.1     lukem may be specified to disallow use of this index by language subtypes.
    198  1.1     lukem The special type
    199  1.1     lukem .B nosubtypes
    200  1.1     lukem may be specified to disallow use of this index by named subtypes.
    201  1.1     lukem Note: changing \fBindex\fP settings in 
    202  1.1     lukem .BR slapd.conf (5)
    203  1.1     lukem requires rebuilding indices, see
    204  1.1     lukem .BR slapindex (8);
    205  1.1     lukem changing \fBindex\fP settings
    206  1.1     lukem dynamically by LDAPModifying "cn=config" automatically causes rebuilding
    207  1.1     lukem of the indices online in a background task.
    208  1.1     lukem .TP
    209  1.1     lukem .B linearindex
    210  1.1     lukem Tell 
    211  1.1     lukem .B slapindex 
    212  1.1     lukem to index one attribute at a time. By default, all indexed
    213  1.1     lukem attributes in an entry are processed at the same time. With this option,
    214  1.1     lukem each indexed attribute is processed individually, using multiple passes
    215  1.1     lukem through the entire database. This option improves 
    216  1.1     lukem .B slapindex 
    217  1.1     lukem performance
    218  1.1     lukem when the database size exceeds the \fBdbcache\fP size. When the \fBdbcache\fP is
    219  1.1     lukem large enough, this option is not needed and will decrease performance.
    220  1.1     lukem Also by default, 
    221  1.1     lukem .B slapadd 
    222  1.1     lukem performs full indexing and so a separate 
    223  1.1     lukem .B slapindex
    224  1.1     lukem run is not needed. With this option, 
    225  1.1     lukem .B slapadd 
    226  1.1     lukem does no indexing and 
    227  1.1     lukem .B slapindex
    228  1.1     lukem must be used.
    229  1.1     lukem .TP
    230  1.1     lukem .BR lockdetect \ { oldest | youngest | fewest | random | default }
    231  1.1     lukem Specify which transaction to abort when a deadlock is detected.
    232  1.1     lukem The default is
    233  1.1     lukem .BR random .
    234  1.1     lukem .TP
    235  1.1     lukem .BI mode \ <integer>
    236  1.1     lukem Specify the file protection mode that newly created database 
    237  1.1     lukem index files should have.
    238  1.1     lukem The default is 0600.
    239  1.1     lukem .TP
    240  1.1     lukem .BI searchstack \ <depth>
    241  1.1     lukem Specify the depth of the stack used for search filter evaluation.
    242  1.1     lukem Search filters are evaluated on a stack to accommodate nested AND / OR
    243  1.1     lukem clauses. An individual stack is assigned to each server thread.
    244  1.1     lukem The depth of the stack determines how complex a filter can be
    245  1.1     lukem evaluated without requiring any additional memory allocation. Filters that
    246  1.1     lukem are nested deeper than the search stack depth will cause a separate
    247  1.1     lukem stack to be allocated for that particular search operation. These
    248  1.1     lukem allocations can have a major negative impact on server performance,
    249  1.1     lukem but specifying too much stack will also consume a great deal of memory.
    250  1.1     lukem Each search stack uses 512K bytes per level. The default stack depth
    251  1.1     lukem is 16, thus 8MB per thread is used.
    252  1.1     lukem .TP
    253  1.1     lukem .BI shm_key \ <integer>
    254  1.1     lukem Specify a key for a shared memory BDB environment. By default the
    255  1.1     lukem BDB environment uses memory mapped files. If a non-zero value is
    256  1.1     lukem specified, it will be used as the key to identify a shared memory
    257  1.1     lukem region that will house the environment.
    258  1.1     lukem .SH ACCESS CONTROL
    259  1.1     lukem The 
    260  1.1     lukem .B bdb
    261  1.1     lukem and
    262  1.1     lukem .B hdb
    263  1.1     lukem backends honor access control semantics as indicated in
    264  1.1     lukem .BR slapd.access (5).
    265  1.1     lukem .SH FILES
    266  1.1     lukem .TP
    267  1.1     lukem .B /etc/openldap/slapd.conf
    268  1.1     lukem default 
    269  1.1     lukem .B slapd 
    270  1.1     lukem configuration file
    271  1.1     lukem .TP
    272  1.1     lukem .B DB_CONFIG
    273  1.1     lukem Berkeley DB configuration file
    274  1.1     lukem .SH SEE ALSO
    275  1.1     lukem .BR slapd.conf (5),
    276  1.3     lukem .BR slapd\-config (5),
    277  1.6  christos .BR slapd\-mdb (5),
    278  1.1     lukem .BR slapd (8),
    279  1.1     lukem .BR slapadd (8),
    280  1.1     lukem .BR slapcat (8),
    281  1.1     lukem .BR slapindex (8),
    282  1.1     lukem Berkeley DB documentation.
    283  1.1     lukem .SH ACKNOWLEDGEMENTS
    284  1.5      tron .lf 1 ./../Project
    285  1.1     lukem .\" Shared Project Acknowledgement Text
    286  1.1     lukem .B "OpenLDAP Software"
    287  1.1     lukem is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>.
    288  1.1     lukem .B "OpenLDAP Software"
    289  1.6  christos is derived from the University of Michigan LDAP 3.3 Release.  
    290  1.6  christos .lf 284 stdin
    291  1.1     lukem Originally begun by Kurt Zeilenga. Caching mechanisms originally designed
    292  1.1     lukem by Jong-Hyuk Choi. Completion and subsequent work, as well as
    293  1.1     lukem back-hdb, by Howard Chu.
    294