1SLAPD-BDB(5)                  File Formats Manual                 SLAPD-BDB(5)
2
3
4

NAME

6       slapd-bdb, slapd-hdb - Berkeley DB backends to slapd
7

SYNOPSIS

9       /etc/openldap/slapd.conf
10

DESCRIPTION

12       The  bdb  backend  to slapd(8) is the recommended primary backend for a
13       normal slapd database.  It uses the Oracle Berkeley DB (BDB) package to
14       store  data.   It  makes extensive use of indexing and caching to speed
15       data access.
16
17       hdb is a variant of the bdb backend that uses a  hierarchical  database
18       layout which supports subtree renames. It is otherwise identical to the
19       bdb behavior, and all the same configuration options apply.
20
21       It is noted that these options are intended to complement  Berkeley  DB
22       configuration  options  set  in  the environment's DB_CONFIG file.  See
23       Berkeley  DB  documentation  for  details  on  DB_CONFIG  configuration
24       options.   Where  there  is  overlap, settings in DB_CONFIG take prece‐
25       dence.
26

CONFIGURATION

28       These slapd.conf options apply to the bdb  and  hdb  backend  database.
29       That  is,  they must follow a "database bdb" or "database hdb" line and
30       come before any subsequent "backend" or "database" lines.  Other  data‐
31       base options are described in the slapd.conf(5) manual page.
32
33       cachesize <integer>
34              Specify  the  size in entries of the in-memory entry cache main‐
35              tained by the bdb or hdb backend database instance.  The default
36              is 1000 entries.
37
38       cachefree <integer>
39              Specify  the number of entries to free from the entry cache when
40              the cache reaches the cachesize limit.  The default is 1 entry.
41
42       checkpoint <kbyte> <min>
43              Specify the frequency for checkpointing the database transaction
44              log.   A  checkpoint  operation  flushes the database buffers to
45              disk and writes a checkpoint record in the log.  The  checkpoint
46              will occur if either <kbyte> data has been written or <min> min‐
47              utes have passed since  the  last  checkpoint.   Both  arguments
48              default  to zero, in which case they are ignored. When the <min>
49              argument is non-zero, an internal task will run every <min> min‐
50              utes  to  perform the checkpoint.  See the Berkeley DB reference
51              guide for more details.
52
53       checksum
54              Enable checksum validation of DB pages whenever  they  are  read
55              from disk.  This setting can only be configured before any data‐
56              base files are created.
57
58       cryptfile <file>
59              Specify the pathname of a file containing an encryption  key  to
60              use  for  encrypting the database. Encryption is performed using
61              Berkeley DB's implementation of AES. Note  that  encryption  can
62              only  be  configured  before any database files are created, and
63              changing the key can only be done after destroying  the  current
64              database  and  recreating  it.  Encryption  is  not  enabled  by
65              default, and some distributions of Berkeley DB  do  not  support
66              encryption.
67
68       cryptkey <key>
69              Specify  an  encryption  key to use for encrypting the database.
70              This option may  be  used  when  a  separate  cryptfile  is  not
71              desired. Only one of cryptkey or cryptfile may be configured.
72
73       dbconfig <Berkeley-DB-setting>
74              Specify  a configuration directive to be placed in the DB_CONFIG
75              file of the database directory. The dbconfig directive is just a
76              convenience  to  allow  all necessary configuration to be set in
77              the slapd.conf file.  The options set using this directive  will
78              only be written to the DB_CONFIG file if no such file existed at
79              server startup time, otherwise they are completely ignored. This
80              allows  one to set initial values without overwriting/destroying
81              a DB_CONFIG file  that  was  already  customized  through  other
82              means.   This  directive  may  be  specified  multiple times, as
83              needed.  For example:
84                   dbconfig set_cachesize 0 1048576 0
85                   dbconfig set_lg_bsize 2097152
86
87       dbnosync
88              Specify that on-disk database contents should not be immediately
89              synchronized  with  in memory changes.  Enabling this option may
90              improve performance at the expense of data  security.   See  the
91              Berkeley DB reference guide for more details.
92
93       dbpagesize  <dbfile> <size>
94              Specify  the page size to use for a particular database file, in
95              units of 1024 bytes. The default for the id2entry  file  is  16,
96              the  default  for  all  other  files  depends on the size of the
97              underlying filesystem's block size (typically 4 or 8).  The max‐
98              imum that BerkeleyDB supports is 64. This setting usually should
99              not need to be changed, but if BerkeleyDB's "db_stat -d" shows a
100              large  amount  of  overflow  pages  in  use in a file, setting a
101              larger size may increase performance  at  the  expense  of  data
102              integrity.  This  setting  only  takes effect when a database is
103              being newly created. See the Berkeley  DB  reference  guide  for
104              more details.
105
106       directory <directory>
107              Specify  the directory where the BDB files containing this data‐
108              base and associated indexes live.  A separate directory must  be
109              specified for each database.  The default is /var/openldap-data.
110
111       dirtyread
112              Allow  reads  of  modified  but not yet committed data.  Usually
113              transactions are  isolated  to  prevent  other  operations  from
114              accessing  uncommitted  data.   This  option may improve perfor‐
115              mance, but may also return  inconsistent  results  if  the  data
116              comes  from  a transaction that is later aborted.  In this case,
117              the modified data is discarded  and  a  subsequent  search  will
118              return a different result.
119
120       dncachesize <integer>
121              Specify  the  maximum  number  of DNs in the in-memory DN cache.
122              Ideally this cache should be large enough to contain the DNs  of
123              every  entry in the database. If set to a smaller value than the
124              cachesize it will be silently increased to equal the  cachesize.
125              The  default value is 0 which means unlimited, i.e. the DN cache
126              will grow without bound.
127
128              It should be noted that the DN cache is allowed  to  temporarily
129              grow  beyond  the  configured size. It does this if many entries
130              are locked when it tries to  do  a  purge,  because  that  means
131              they're  legitimately  in  use.  Also, the DN cache never purges
132              entries that have cached children, so depending on the shape  of
133              the  DIT,  it  could  have  lots  of cached DNs over the defined
134              limit.
135
136       idlcachesize <integer>
137              Specify the size of the in-memory index cache, in  index  slots.
138              The  default  is  zero.  A  larger  value will speed up frequent
139              searches of indexed entries. An hdb database needs a large  idl‐
140              cachesize for good search performance, typically three times the
141              cachesize (entry cache size) or larger.
142
143       index {<attrlist>|default} [pres,eq,approx,sub,<special>]
144              Specify the indexes to maintain for the given attribute (or list
145              of  attributes).   Some  attributes  only  support  a  subset of
146              indexes.  If only an <attr> is given, the indices specified  for
147              default  are  maintained.   Note that setting a default does not
148              imply that all attributes will be indexed. Also, for  best  per‐
149              formance,  an  eq  index  should  always  be  configured for the
150              objectClass attribute.
151
152              A number of special index  parameters  may  be  specified.   The
153              index  type  sub  can be decomposed into subinitial, subany, and
154              subfinal indices.  The special type nolang may be  specified  to
155              disallow  use  of  this index by language subtypes.  The special
156              type nosubtypes may be specified to disallow use of  this  index
157              by   named   subtypes.    Note:   changing   index  settings  in
158              slapd.conf(5) requires  rebuilding  indices,  see  slapindex(8);
159              changing index settings dynamically by LDAPModifying "cn=config"
160              automatically causes rebuilding of the indices online in a back‐
161              ground task.
162
163       linearindex
164              Tell slapindex to index one attribute at a time. By default, all
165              indexed attributes in an entry are processed at the  same  time.
166              With  this option, each indexed attribute is processed individu‐
167              ally, using multiple passes through the  entire  database.  This
168              option  improves  slapindex  performance  when the database size
169              exceeds the dbcache size. When the dbcache is large enough, this
170              option  is  not  needed  and will decrease performance.  Also by
171              default, slapadd  performs  full  indexing  and  so  a  separate
172              slapindex  run  is not needed. With this option, slapadd does no
173              indexing and slapindex must be used.
174
175       lockdetect {oldest|youngest|fewest|random|default}
176              Specify which transaction to abort when a deadlock is  detected.
177              The default is random.
178
179       mode <integer>
180              Specify  the  file  protection  mode that newly created database
181              index files should have.  The default is 0600.
182
183       searchstack <depth>
184              Specify the depth of the stack used for  search  filter  evalua‐
185              tion.   Search  filters  are evaluated on a stack to accommodate
186              nested AND / OR clauses. An individual stack is assigned to each
187              server  thread.  The depth of the stack determines how complex a
188              filter can be evaluated without requiring any additional  memory
189              allocation. Filters that are nested deeper than the search stack
190              depth will cause a separate stack to be allocated for that  par‐
191              ticular  search  operation.  These  allocations can have a major
192              negative impact on server performance, but specifying  too  much
193              stack  will  also  consume  a great deal of memory.  Each search
194              stack uses 512K bytes per level. The default stack depth is  16,
195              thus 8MB per thread is used.
196
197       shm_key <integer>
198              Specify  a  key  for a shared memory BDB environment. By default
199              the BDB environment uses memory  mapped  files.  If  a  non-zero
200              value  is  specified,  it  will be used as the key to identify a
201              shared memory region that will house the environment.
202

ACCESS CONTROL

204       The bdb and hdb backends honor access control semantics as indicated in
205       slapd.access(5).
206

FILES

208       /etc/openldap/slapd.conf
209              default slapd configuration file
210
211       DB_CONFIG
212              Berkeley DB configuration file
213

SEE ALSO

215       slapd.conf(5),   slapd-config(5),   slapd(8),  slapadd(8),  slapcat(8),
216       slapindex(8), Berkeley DB documentation.
217

ACKNOWLEDGEMENTS

219       OpenLDAP Software is developed and maintained by The  OpenLDAP  Project
220       <http://www.openldap.org/>.   OpenLDAP Software is derived from Univer‐
221       sity of Michigan LDAP 3.3 Release.  Originally begun by Kurt  Zeilenga.
222       Caching  mechanisms  originally  designed by Jong-Hyuk Choi. Completion
223       and subsequent work, as well as back-hdb, by Howard Chu.
224
225
226
227OpenLDAP 2.4.23                   2010/06/30                      SLAPD-BDB(5)
Impressum