]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-bdb.5
Document partially implemented "disclose" level.
[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 details on
26 .B DB_CONFIG
27 configuration options.
28 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 log.
48 A checkpoint operation flushes the database buffers to disk and writes
49 a checkpoint record in the log.
50 The checkpoint will occur if either <kbyte> data has been written or
51 <min> minutes have passed since the last checkpoint.
52 Both arguments default to zero, in which case they are ignored. When
53 the <min> argument is non-zero, an internal task will run every <min>
54 minutes to perform the checkpoint.
55 See the Berkeley DB reference guide for more details.
56 .TP
57 .B dbnosync
58 Specify that on-disk database contents should not be immediately
59 synchronized with in memory changes.
60 Enabling this option may improve performance at the expense of data
61 security.
62 See the Berkeley DB reference guide for more details.
63 .TP
64 .B directory <directory>
65 Specify the directory where the BDB files containing this database and
66 associated indexes live.
67 A separate directory must be specified for each database.
68 The default is
69 .BR LOCALSTATEDIR/openldap-data .
70 .TP
71 .B dirtyread
72 Allow reads of modified but not yet committed data.
73 Usually transactions are isolated to prevent other operations from
74 accessing uncommitted data.
75 This option may improve performance, but may also return inconsistent
76 results if the data comes from a transaction that is later aborted.
77 In this case, the modified data is discarded and a subsequent search
78 will return a different result.
79 .TP
80 .B idlcachesize <integer>
81 Specify the size of the in-memory index cache, in index slots. The
82 default is zero. A larger value will speed up frequent searches of
83 indexed entries. An hdb database needs a large idlcachesize
84 for good search performance, typically three times the entry cache size
85 or larger.
86 .TP
87 .B
88 index {<attrlist>|default} [pres,eq,approx,sub,<special>]
89 Specify the indexes to maintain for the given attribute (or
90 list of attributes).
91 Some attributes only support a subset of indexes.
92 If only an <attr> is given, the indices specified for \fBdefault\fR
93 are maintained.
94 Note that setting a default does not imply that all attributes will be
95 indexed. Also, for best performance, an
96 .B eq
97 index should always be configured for the
98 .B objectClass
99 attribute.
100
101 A number of special index parameters may be specified.
102 The index type
103 .B sub
104 can be decomposed into
105 .BR subinitial ,
106 .BR subany ,\ and
107 .B subfinal
108 indices.
109 The special type
110 .B nolang
111 may be specified to disallow use of this index by language subtypes.
112 The special type
113 .B nosubtypes
114 may be specified to disallow use of this index by named subtypes.
115 Note: changing index settings requires rebuilding indices, see
116 .BR slapindex (8).
117 .TP
118 .B linearindex
119 Tell slapindex to index one attribute at a time. By default, all indexed
120 attributes in an entry are processed at the same time. With this option,
121 each indexed attribute is processed individually, using multiple passes
122 through the entire database. This option improves slapindex performance
123 when the database size exceeds the dbcache size. When the dbcache is
124 large enough, this option is not needed and will decrease performance.
125 Also by default, slapadd performs full indexing and so a separate slapindex
126 run is not needed. With this option, slapadd does no indexing and slapindex
127 must be used.
128 .TP
129 .B lockdetect {oldest|youngest|fewest|random|default}
130 Specify which transaction to abort when a deadlock is detected.
131 The default is the same as
132 .BR random .
133 .TP
134 .B mode <integer>
135 Specify the file protection mode that newly created database 
136 index files should have.
137 The default is 0600.
138 .TP
139 .B searchstack <depth>
140 Specify the depth of the stack used for search filter evaluation.
141 Search filters are evaluated on a stack to accommodate nested AND / OR
142 clauses. An individual stack is assigned to each server thread.
143 The depth of the stack determines how complex a filter can be
144 evaluated without requiring any additional memory allocation. Filters that
145 are nested deeper than the search stack depth will cause a separate
146 stack to be allocated for that particular search operation. These
147 allocations can have a major negative impact on server performance,
148 but specifying too much stack will also consume a great deal of memory.
149 Each search stack uses 512K bytes per level. The default stack depth
150 is 16, thus 8MB per thread is used.
151 .TP
152 .B shm_key <integer>
153 Specify a key for a shared memory BDB environment. By default the
154 BDB environment uses memory mapped files. If a non-zero value is
155 specified, it will be used as the key to identify a shared memory
156 region that will house the environment.
157 .B
158 .SH FILES
159 .TP
160 ETCDIR/slapd.conf
161 default slapd configuration file
162 .TP
163 DB_CONFIG
164 Berkeley DB configuration file
165 .SH SEE ALSO
166 .BR slapd.conf (5),
167 .BR slapd (8),
168 .BR slapadd (8),
169 .BR slapcat (8),
170 .BR slapindex (8),
171 Berkeley DB documentation.