2002-06-13 11:59:10 +08:00
|
|
|
.TH SLAPD-BDB 5 "RELEASEDATE" "OpenLDAP LDVERSION"
|
2005-01-02 04:49:32 +08:00
|
|
|
.\" Copyright 1998-2005 The OpenLDAP Foundation All Rights Reserved.
|
2002-04-30 04:24:29 +08:00
|
|
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
|
|
|
.\" $OpenLDAP$
|
|
|
|
.SH NAME
|
|
|
|
slapd-bdb \- BDB backend to slapd
|
|
|
|
.SH SYNOPSIS
|
|
|
|
ETCDIR/slapd.conf
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The BDB backend to
|
|
|
|
.BR slapd (8)
|
|
|
|
is the recommended backend for a normal slapd database.
|
2003-06-27 20:22:27 +08:00
|
|
|
However, it takes more care than with the LDBM backend to configure
|
|
|
|
it properly.
|
2003-04-25 00:22:46 +08:00
|
|
|
It uses the Sleepycat Berkeley DB (BDB) package to store data.
|
2002-04-30 04:24:29 +08:00
|
|
|
It makes extensive use of indexing and caching to speed data access.
|
2003-06-27 20:22:27 +08:00
|
|
|
.LP
|
2003-04-25 00:22:46 +08:00
|
|
|
It is noted that these options are intended to complement
|
|
|
|
Berkeley DB configuration options set in the environment's
|
|
|
|
.B DB_CONFIG
|
2004-06-18 06:51:27 +08:00
|
|
|
file. See Berkeley DB documentation for details on
|
2003-04-25 00:22:46 +08:00
|
|
|
.B DB_CONFIG
|
2004-06-18 06:51:27 +08:00
|
|
|
configuration options.
|
2004-06-18 07:01:22 +08:00
|
|
|
Where there is overlap, settings in
|
|
|
|
.B DB_CONFIG
|
|
|
|
take precedence.
|
2002-04-30 04:24:29 +08:00
|
|
|
.SH CONFIGURATION
|
2002-05-02 00:38:30 +08:00
|
|
|
These
|
|
|
|
.B slapd.conf
|
|
|
|
options apply to the BDB backend database.
|
2002-04-30 04:24:29 +08:00
|
|
|
That is, they must follow a "database bdb" line and come before any
|
|
|
|
subsequent "backend" or "database" lines.
|
2002-05-02 00:38:30 +08:00
|
|
|
Other database options are described in the
|
|
|
|
.BR slapd.conf (5)
|
|
|
|
manual page.
|
2002-04-30 04:24:29 +08:00
|
|
|
.TP
|
|
|
|
.B cachesize <integer>
|
|
|
|
Specify the size in entries of the in-memory cache maintained
|
|
|
|
by the BDB backend database instance.
|
|
|
|
The default is 1000 entries.
|
2004-06-18 07:23:15 +08:00
|
|
|
.TP
|
|
|
|
.B checkpoint <kbyte> <min>
|
|
|
|
Specify the frequency for checkpointing the database transaction log.
|
|
|
|
A checkpoint operation flushes the database buffers to disk and writes
|
|
|
|
a checkpoint record in the log.
|
|
|
|
The checkpoint will occur if either <kbyte> data has been written or
|
|
|
|
<min> minutes have passed since the last checkpoint.
|
2004-12-04 01:36:38 +08:00
|
|
|
Both arguments default to zero, in which case they are ignored. When
|
|
|
|
the <min> argument is non-zero, an internal task will run every <min>
|
|
|
|
minutes to perform the checkpoint.
|
2004-06-18 07:23:15 +08:00
|
|
|
See the Berkeley DB reference guide for more details.
|
|
|
|
.TP
|
|
|
|
.B dbnosync
|
|
|
|
Specify that on-disk database contents should not be immediately
|
|
|
|
synchronized with in memory changes.
|
|
|
|
Enabling this option may improve performance at the expense of data
|
|
|
|
security.
|
|
|
|
See the Berkeley DB reference guide for more details.
|
2002-04-30 04:24:29 +08:00
|
|
|
.TP
|
|
|
|
.B directory <directory>
|
|
|
|
Specify the directory where the BDB files containing this database and
|
|
|
|
associated indexes live.
|
|
|
|
A separate directory must be specified for each database.
|
|
|
|
The default is
|
|
|
|
.BR LOCALSTATEDIR/openldap-data .
|
|
|
|
.TP
|
|
|
|
.B dirtyread
|
|
|
|
Allow reads of modified but not yet committed data.
|
|
|
|
Usually transactions are isolated to prevent other operations from
|
|
|
|
accessing uncommitted data.
|
|
|
|
This option may improve performance, but may also return inconsistent
|
|
|
|
results if the data comes from a transaction that is later aborted.
|
|
|
|
In this case, the modified data is discarded and a subsequent search
|
|
|
|
will return a different result.
|
|
|
|
.TP
|
2003-09-27 15:06:48 +08:00
|
|
|
.B idlcachesize <integer>
|
|
|
|
Specify the size of the in-memory index cache, in index slots. The
|
|
|
|
default is zero. A larger value will speed up frequent searches of
|
|
|
|
indexed entries.
|
|
|
|
.TP
|
2002-04-30 04:24:29 +08:00
|
|
|
.B
|
|
|
|
index {<attrlist>|default} [pres,eq,approx,sub,<special>]
|
|
|
|
Specify the indexes to maintain for the given attribute (or
|
|
|
|
list of attributes).
|
|
|
|
Some attributes only support a subset of indexes.
|
|
|
|
If only an <attr> is given, the indices specified for \fBdefault\fR
|
|
|
|
are maintained.
|
|
|
|
Note that setting a default does not imply that all attributes will be
|
2005-01-19 18:10:51 +08:00
|
|
|
indexed. Also, for best performance, an
|
|
|
|
.B eq
|
|
|
|
index should always be configured for the
|
|
|
|
.B objectClass
|
|
|
|
attribute.
|
2002-04-30 04:24:29 +08:00
|
|
|
|
|
|
|
A number of special index parameters may be specified.
|
|
|
|
The index type
|
|
|
|
.B sub
|
|
|
|
can be decomposed into
|
|
|
|
.BR subinitial ,
|
|
|
|
.BR subany ,\ and
|
|
|
|
.B subfinal
|
|
|
|
indices.
|
|
|
|
The special type
|
|
|
|
.B nolang
|
|
|
|
may be specified to disallow use of this index by language subtypes.
|
|
|
|
The special type
|
|
|
|
.B nosubtypes
|
|
|
|
may be specified to disallow use of this index by named subtypes.
|
|
|
|
Note: changing index settings requires rebuilding indices, see
|
|
|
|
.BR slapindex (8).
|
|
|
|
.TP
|
2004-07-23 06:32:37 +08:00
|
|
|
.B linearindex
|
|
|
|
Tell slapindex to index one attribute at a time. By default, all indexed
|
|
|
|
attributes in an entry are processed at the same time. With this option,
|
|
|
|
each indexed attribute is processed individually, using multiple passes
|
|
|
|
through the entire database. This option improves slapindex performance
|
|
|
|
when the database size exceeds the dbcache size. When the dbcache is
|
|
|
|
large enough, this option is not needed and will decrease performance.
|
2004-07-23 06:52:47 +08:00
|
|
|
Also by default, slapadd performs full indexing and so a separate slapindex
|
|
|
|
run is not needed. With this option, slapadd does no indexing and slapindex
|
|
|
|
must be used.
|
2004-07-23 06:32:37 +08:00
|
|
|
.TP
|
2002-04-30 04:24:29 +08:00
|
|
|
.B lockdetect {oldest|youngest|fewest|random|default}
|
|
|
|
Specify which transaction to abort when a deadlock is detected.
|
|
|
|
The default is the same as
|
|
|
|
.BR random .
|
|
|
|
.TP
|
|
|
|
.B mode <integer>
|
|
|
|
Specify the file protection mode that newly created database
|
|
|
|
index files should have.
|
|
|
|
The default is 0600.
|
2002-12-13 07:39:21 +08:00
|
|
|
.TP
|
|
|
|
.B searchstack <depth>
|
|
|
|
Specify the depth of the stack used for search filter evaluation.
|
2003-11-25 07:16:45 +08:00
|
|
|
Search filters are evaluated on a stack to accommodate nested AND / OR
|
2002-12-13 07:39:21 +08:00
|
|
|
clauses. An individual stack is assigned to each server thread.
|
|
|
|
The depth of the stack determines how complex a filter can be
|
|
|
|
evaluated without requiring any additional memory allocation. Filters that
|
|
|
|
are nested deeper than the search stack depth will cause a separate
|
|
|
|
stack to be allocated for that particular search operation. These
|
|
|
|
allocations can have a major negative impact on server performance,
|
|
|
|
but specifying too much stack will also consume a great deal of memory.
|
|
|
|
Each search stack uses 512K bytes per level. The default stack depth
|
|
|
|
is 16, thus 8MB per thread is used.
|
2004-06-18 07:01:22 +08:00
|
|
|
.TP
|
|
|
|
.B shm_key <integer>
|
|
|
|
Specify a key for a shared memory BDB environment. By default the
|
|
|
|
BDB environment uses memory mapped files. If a non-zero value is
|
|
|
|
specified, it will be used as the key to identify a shared memory
|
|
|
|
region that will house the environment.
|
2003-11-25 07:16:45 +08:00
|
|
|
.B
|
2002-05-02 00:38:30 +08:00
|
|
|
.SH FILES
|
2002-05-09 10:07:41 +08:00
|
|
|
.TP
|
2002-05-02 00:38:30 +08:00
|
|
|
ETCDIR/slapd.conf
|
2002-05-09 10:07:41 +08:00
|
|
|
default slapd configuration file
|
2003-04-25 00:22:46 +08:00
|
|
|
.TP
|
|
|
|
DB_CONFIG
|
|
|
|
Berkeley DB configuration file
|
2002-04-30 04:24:29 +08:00
|
|
|
.SH SEE ALSO
|
|
|
|
.BR slapd.conf (5),
|
|
|
|
.BR slapd (8),
|
|
|
|
.BR slapadd (8),
|
|
|
|
.BR slapcat (8),
|
2003-04-25 00:22:46 +08:00
|
|
|
.BR slapindex (8),
|
2003-06-27 20:22:27 +08:00
|
|
|
Berkeley DB documentation.
|