]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-mdb.5
Merge remote branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / doc / man / man5 / slapd-mdb.5
1 .TH SLAPD-MDB 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 2011-2012 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd\-mdb \- Memory-Mapped DB backend to slapd
7 .SH SYNOPSIS
8 .B ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The \fBmdb\fP backend to
11 .BR slapd (8)
12 uses OpenLDAP's own Memory-Mapped DB (MDB) library to store data.
13 It relies completely on the underlying operating system for memory
14 management and does no caching of its own.
15 .LP
16 The \fBmdb\fP backend is similar to the \fBhdb\fP backend in that
17 it uses a hierarchical database layout which
18 supports subtree renames. It is both more space-efficient and more
19 execution-efficient than the \fBbdb\fP backend, while being overall
20 much simpler to manage.
21 .SH CONFIGURATION
22 These
23 .B slapd.conf
24 options apply to the \fBmdb\fP backend database.
25 That is, they must follow a "database mdb" line and
26 come before any subsequent "backend" or "database" lines.
27 Other database options are described in the
28 .BR slapd.conf (5)
29 manual page.
30 .TP
31 .BI checkpoint \ <kbyte>\ <min>
32 Specify the frequency for flushing the database disk buffers.
33 This setting is only needed if the \fBdbnosync\fP option is used.
34 The checkpoint will occur if either \fI<kbyte>\fP data has been written or
35 \fI<min>\fP minutes have passed since the last checkpoint.
36 Both arguments default to zero, in which case they are ignored. When
37 the \fI<min>\fP argument is non-zero, an internal task will run every 
38 \fI<min>\fP minutes to perform the checkpoint.
39 Note: currently the \fI<kbyte>\fP setting is unimplemented.
40 .TP
41 .B dbnosync
42 Specify that on-disk database contents should not be immediately
43 synchronized with in memory changes.
44 Enabling this option may improve performance at the expense of data
45 security. In particular, if the operating system crashes before changes are
46 flushed, some number of transactions may be lost.
47 By default, a full data flush/sync is performed when each
48 transaction is committed.
49 .TP
50 .BI directory \ <directory>
51 Specify the directory where the MDB files containing this database and
52 associated indexes live.
53 A separate directory must be specified for each database.
54 The default is
55 .BR LOCALSTATEDIR/openldap\-data .
56 .TP
57 \fBindex \fR{\fI<attrlist>\fR|\fBdefault\fR} [\fBpres\fR,\fBeq\fR,\fBapprox\fR,\fBsub\fR,\fI<special>\fR]
58 Specify the indexes to maintain for the given attribute (or
59 list of attributes).
60 Some attributes only support a subset of indexes.
61 If only an \fI<attr>\fP is given, the indices specified for \fBdefault\fR
62 are maintained.
63 Note that setting a default does not imply that all attributes will be
64 indexed. Also, for best performance, an
65 .B eq
66 index should always be configured for the
67 .B objectClass
68 attribute.
69
70 A number of special index parameters may be specified.
71 The index type
72 .B sub
73 can be decomposed into
74 .BR subinitial ,
75 .BR subany ,\ and
76 .B subfinal
77 indices.
78 The special type
79 .B nolang
80 may be specified to disallow use of this index by language subtypes.
81 The special type
82 .B nosubtypes
83 may be specified to disallow use of this index by named subtypes.
84 Note: changing \fBindex\fP settings in 
85 .BR slapd.conf (5)
86 requires rebuilding indices, see
87 .BR slapindex (8);
88 changing \fBindex\fP settings
89 dynamically by LDAPModifying "cn=config" automatically causes rebuilding
90 of the indices online in a background task.
91 .TP
92 .BI maxreaders \ <integer>
93 Specify the maximum number of threads that may have concurrent read access
94 to the database. Tools such as slapcat count as a single thread,
95 in addition to threads in any active slapd processes. The
96 default is 126.
97 .TP
98 .BI maxsize \ <bytes>
99 Specify the maximum size of the database in bytes. A memory map of this
100 size is allocated at startup time and the database will not be allowed
101 to grow beyond this size. The default is 10485760 bytes. This setting
102 may be changed upward if the configured limit needs to be increased.
103
104 Note: It is important to set this to as large a value as possible,
105 (relative to anticipated growth of the actual data over time) since
106 growing the size later may not be practical when the system is under
107 heavy load.
108 .TP
109 .BI mode \ <integer>
110 Specify the file protection mode that newly created database 
111 files should have.
112 The default is 0600.
113 .TP
114 .BI searchstack \ <depth>
115 Specify the depth of the stack used for search filter evaluation.
116 Search filters are evaluated on a stack to accommodate nested AND / OR
117 clauses. An individual stack is assigned to each server thread.
118 The depth of the stack determines how complex a filter can be
119 evaluated without requiring any additional memory allocation. Filters that
120 are nested deeper than the search stack depth will cause a separate
121 stack to be allocated for that particular search operation. These
122 allocations can have a major negative impact on server performance,
123 but specifying too much stack will also consume a great deal of memory.
124 Each search stack uses 512K bytes per level. The default stack depth
125 is 16, thus 8MB per thread is used.
126 .SH ACCESS CONTROL
127 The 
128 .B mdb
129 backend honors access control semantics as indicated in
130 .BR slapd.access (5).
131 .SH NOTES
132 This is an early release; the database file format or other
133 characteristics may change incompatibly in future releases.
134 .SH FILES
135 .TP
136 .B ETCDIR/slapd.conf
137 default 
138 .B slapd 
139 configuration file
140 .SH SEE ALSO
141 .BR slapd.conf (5),
142 .BR slapd\-config (5),
143 .BR slapd (8),
144 .BR slapadd (8),
145 .BR slapcat (8),
146 .BR slapindex (8),
147 OpenLDAP MDB documentation.
148 .SH ACKNOWLEDGEMENTS
149 .so ../Project
150 Written by Howard Chu.