]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-bdb.5
Import slapd-hdb(5)
[openldap] / doc / man / man5 / slapd-bdb.5
1 .TH SLAPD-BDB 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2005 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd-bdb, slapd-hdb \- BDB backends to slapd
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The BDB backend to
11 .BR slapd (8)
12 is the recommended backend for a normal slapd database.
13 However, it takes more care than with the LDBM backend to configure
14 it properly.
15 It uses the Sleepycat Berkeley DB (BDB) package to store data.
16 It makes extensive use of indexing and caching to speed data access.
17 .LP
18 "hdb" is a variant of the BDB backend that uses a hierarchical database
19 layout which supports subtree renames.  It is otherwise identical to
20 the "bdb" behavior, and all the same configuration options apply.
21 .LP
22 It is noted that these options are intended to complement
23 Berkeley DB configuration options set in the environment's
24 .B DB_CONFIG
25 file.  See Berkeley DB documentation for
26 details on
27 .B DB_CONFIG
28 configuration options.  Where there is overlap, settings in
29 .B DB_CONFIG
30 take precedence.
31 .SH CONFIGURATION
32 These
33 .B slapd.conf
34 options apply to the BDB backend database.
35 That is, they must follow a "database bdb" or "database hdb" line and
36 come before any subsequent "backend" or "database" lines.
37 Other database options are described in the
38 .BR slapd.conf (5)
39 manual page.
40 .TP
41 .B cachesize <integer>
42 Specify the size in entries of the in-memory entry cache maintained 
43 by the BDB backend database instance.
44 The default is 1000 entries.
45 .TP
46 .B checkpoint <kbyte> <min>
47 Specify the frequency for checkpointing the database transaction
48 log upon updating of the database.  A checkpoint flushes the
49 database buffers to disk and writes a checkpoint record in the log.
50 Upon a database update, a checkpoint will occur if either <kbyte>
51 data has been written or <min> minutes have passed since the last
52 checkpoint.  Both arguments default to zero, in which case they are
53 ignored.  Note: checkpointing by this directive occurs only upon execution of
54 a database update.  If one desires checkpointing to occur otherwise,
55 db_checkpoint(1) or some other external process should be used to cause
56 a database checkpoint to be taken.  See the Berkeley DB reference
57 guide for more details.
58 .TP
59 .B dbnosync
60 Specify that on-disk database contents should not be immediately
61 synchronized with in memory changes.
62 Enabling this option may improve performance at the expense of data
63 security.
64 .TP
65 .B directory <directory>
66 Specify the directory where the BDB files containing this database and
67 associated indexes live.
68 A separate directory must be specified for each database.
69 The default is
70 .BR LOCALSTATEDIR/openldap-data .
71 .TP
72 .B dirtyread
73 Allow reads of modified but not yet committed data.
74 Usually transactions are isolated to prevent other operations from
75 accessing uncommitted data.
76 This option may improve performance, but may also return inconsistent
77 results if the data comes from a transaction that is later aborted.
78 In this case, the modified data is discarded and a subsequent search
79 will return a different result.
80 .TP
81 .B idlcachesize <integer>
82 Specify the size of the in-memory index cache, in index slots. The
83 default is zero. A larger value will speed up frequent searches of
84 indexed entries. An hdb database needs a large idlcachesize
85 for good search performance, typically three times the entry cache size
86 or larger.
87 .TP
88 .B
89 index {<attrlist>|default} [pres,eq,approx,sub,<special>]
90 Specify the indexes to maintain for the given attribute (or
91 list of attributes).
92 Some attributes only support a subset of indexes.
93 If only an <attr> is given, the indices specified for \fBdefault\fR
94 are maintained.
95 Note that setting a default does not imply that all attributes will be
96 indexed. Also, for best performance, an
97 .B eq
98 index should always be configured for the
99 .B objectClass
100 attribute.
101
102 A number of special index parameters may be specified.
103 The index type
104 .B sub
105 can be decomposed into
106 .BR subinitial ,
107 .BR subany ,\ and
108 .B subfinal
109 indices.
110 The special type
111 .B nolang
112 may be specified to disallow use of this index by language subtypes.
113 The special type
114 .B nosubtypes
115 may be specified to disallow use of this index by named subtypes.
116 Note: changing index settings requires rebuilding indices, see
117 .BR slapindex (8).
118 .TP
119 .B lockdetect {oldest|youngest|fewest|random|default}
120 Specify which transaction to abort when a deadlock is detected.
121 The default is the same as
122 .BR random .
123 .TP
124 .B mode <integer>
125 Specify the file protection mode that newly created database 
126 index files should have.
127 The default is 0600.
128 .TP
129 .B searchstack <depth>
130 Specify the depth of the stack used for search filter evaluation.
131 Search filters are evaluated on a stack to accommodate nested AND / OR
132 clauses. An individual stack is assigned to each server thread.
133 The depth of the stack determines how complex a filter can be
134 evaluated without requiring any additional memory allocation. Filters that
135 are nested deeper than the search stack depth will cause a separate
136 stack to be allocated for that particular search operation. These
137 allocations can have a major negative impact on server performance,
138 but specifying too much stack will also consume a great deal of memory.
139 Each search stack uses 512K bytes per level. The default stack depth
140 is 16, thus 8MB per thread is used.
141 .TP
142 .B shm_key <integer>
143 Specify a key for a shared memory BDB environment. By default the
144 BDB environment uses memory mapped files. If a non-zero value is
145 specified, it will be used as the key to identify a shared memory
146 region that will house the environment.
147 .TP
148 .B sessionlog <sid> <limit>
149 Specify a session log store for the syncrepl replication provider
150 server. The session log store contains information on the entries that
151 have been scoped out of the provider replication content identified by
152 .B <sid>.
153 The number of entries in the session log store is limited by
154 .B <limit>.
155 Excessive entries are removed from the store in the FIFO order.
156 Both
157 .B <sid>
158 and
159 .B <limit>
160 are non-negative integers.
161 .B <sid>
162 has no more than three decimal digits.
163 Refer to the "OpenLDAP Administrator's Guide" for detailed information
164 on setting up a replicated slapd directory service using the syncrepl
165 replication engine and the session log store.
166 .B
167 .SH FILES
168 .TP
169 ETCDIR/slapd.conf
170 default slapd configuration file
171 .TP
172 DB_CONFIG
173 Berkeley DB configuration file
174 .SH SEE ALSO
175 .BR slapd.conf (5),
176 .BR slapd (8),
177 .BR slapadd (8),
178 .BR slapcat (8),
179 .BR slapindex (8),
180 Berkeley DB documentation.