mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
151 lines
5.4 KiB
Groff
151 lines
5.4 KiB
Groff
.TH SLAPD-MDB 5 "RELEASEDATE" "OpenLDAP LDVERSION"
|
|
.\" Copyright 2011-2012 The OpenLDAP Foundation All Rights Reserved.
|
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
|
.\" $OpenLDAP$
|
|
.SH NAME
|
|
slapd\-mdb \- Memory-Mapped DB backend to slapd
|
|
.SH SYNOPSIS
|
|
.B ETCDIR/slapd.conf
|
|
.SH DESCRIPTION
|
|
The \fBmdb\fP backend to
|
|
.BR slapd (8)
|
|
uses OpenLDAP's own Memory-Mapped DB (MDB) library to store data.
|
|
It relies completely on the underlying operating system for memory
|
|
management and does no caching of its own.
|
|
.LP
|
|
The \fBmdb\fP backend is similar to the \fBhdb\fP backend in that
|
|
it uses a hierarchical database layout which
|
|
supports subtree renames. It is both more space-efficient and more
|
|
execution-efficient than the \fBbdb\fP backend, while being overall
|
|
much simpler to manage.
|
|
.SH CONFIGURATION
|
|
These
|
|
.B slapd.conf
|
|
options apply to the \fBmdb\fP backend database.
|
|
That is, they must follow a "database mdb" line and
|
|
come before any subsequent "backend" or "database" lines.
|
|
Other database options are described in the
|
|
.BR slapd.conf (5)
|
|
manual page.
|
|
.TP
|
|
.BI checkpoint \ <kbyte>\ <min>
|
|
Specify the frequency for flushing the database disk buffers.
|
|
This setting is only needed if the \fBdbnosync\fP option is used.
|
|
The checkpoint will occur if either \fI<kbyte>\fP data has been written or
|
|
\fI<min>\fP minutes have passed since the last checkpoint.
|
|
Both arguments default to zero, in which case they are ignored. When
|
|
the \fI<min>\fP argument is non-zero, an internal task will run every
|
|
\fI<min>\fP minutes to perform the checkpoint.
|
|
Note: currently the \fI<kbyte>\fP setting is unimplemented.
|
|
.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. In particular, if the operating system crashes before changes are
|
|
flushed, some number of transactions may be lost.
|
|
By default, a full data flush/sync is performed when each
|
|
transaction is committed.
|
|
.TP
|
|
.BI directory \ <directory>
|
|
Specify the directory where the MDB 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
|
|
\fBindex \fR{\fI<attrlist>\fR|\fBdefault\fR} [\fBpres\fR,\fBeq\fR,\fBapprox\fR,\fBsub\fR,\fI<special>\fR]
|
|
Specify the indexes to maintain for the given attribute (or
|
|
list of attributes).
|
|
Some attributes only support a subset of indexes.
|
|
If only an \fI<attr>\fP is given, the indices specified for \fBdefault\fR
|
|
are maintained.
|
|
Note that setting a default does not imply that all attributes will be
|
|
indexed. Also, for best performance, an
|
|
.B eq
|
|
index should always be configured for the
|
|
.B objectClass
|
|
attribute.
|
|
|
|
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 \fBindex\fP settings in
|
|
.BR slapd.conf (5)
|
|
requires rebuilding indices, see
|
|
.BR slapindex (8);
|
|
changing \fBindex\fP settings
|
|
dynamically by LDAPModifying "cn=config" automatically causes rebuilding
|
|
of the indices online in a background task.
|
|
.TP
|
|
.BI maxreaders \ <integer>
|
|
Specify the maximum number of threads that may have concurrent read access
|
|
to the database. Tools such as slapcat count as a single thread,
|
|
in addition to threads in any active slapd processes. The
|
|
default is 126.
|
|
.TP
|
|
.BI maxsize \ <bytes>
|
|
Specify the maximum size of the database in bytes. A memory map of this
|
|
size is allocated at startup time and the database will not be allowed
|
|
to grow beyond this size. The default is 10485760 bytes. This setting
|
|
may be changed upward if the configured limit needs to be increased.
|
|
|
|
Note: It is important to set this to as large a value as possible,
|
|
(relative to anticipated growth of the actual data over time) since
|
|
growing the size later may not be practical when the system is under
|
|
heavy load.
|
|
.TP
|
|
.BI mode \ <integer>
|
|
Specify the file protection mode that newly created database
|
|
files should have.
|
|
The default is 0600.
|
|
.TP
|
|
.BI searchstack \ <depth>
|
|
Specify the depth of the stack used for search filter evaluation.
|
|
Search filters are evaluated on a stack to accommodate nested AND / OR
|
|
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.
|
|
.SH ACCESS CONTROL
|
|
The
|
|
.B mdb
|
|
backend honors access control semantics as indicated in
|
|
.BR slapd.access (5).
|
|
.SH NOTES
|
|
This is an early release; the database file format or other
|
|
characteristics may change incompatibly in future releases.
|
|
.SH FILES
|
|
.TP
|
|
.B ETCDIR/slapd.conf
|
|
default
|
|
.B slapd
|
|
configuration file
|
|
.SH SEE ALSO
|
|
.BR slapd.conf (5),
|
|
.BR slapd\-config (5),
|
|
.BR slapd (8),
|
|
.BR slapadd (8),
|
|
.BR slapcat (8),
|
|
.BR slapindex (8),
|
|
OpenLDAP MDB documentation.
|
|
.SH ACKNOWLEDGEMENTS
|
|
.so ../Project
|
|
Written by Howard Chu.
|