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