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 Sleepycat Berkeley DB (BDB) package
14       to 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       dbconfig <Berkeley-DB-setting>
54              Specify a configuration directive to be placed in the  DB_CONFIG
55              file of the database directory. The dbconfig directive is just a
56              convenience to allow all necessary configuration to  be  set  in
57              the  slapd.conf file.  The options set using this directive will
58              only be written to the DB_CONFIG file if no such file existed at
59              server startup time. This allows one to set initial values with‐
60              out overwriting/destroying a DB_CONFIG  file  that  was  already
61              customized through other means.  This directive may be specified
62              multiple times, as needed.  For example:
63                   dbconfig set_cachesize 0 1048576 0
64                   dbconfig set_lg_bsize 2097152
65
66       dbnosync
67              Specify that on-disk database contents should not be immediately
68              synchronized  with  in memory changes.  Enabling this option may
69              improve performance at the expense of data  security.   See  the
70              Berkeley DB reference guide for more details.
71
72       directory <directory>
73              Specify  the directory where the BDB files containing this data‐
74              base and associated indexes live.  A separate directory must  be
75              specified for each database.  The default is /var/openldap-data.
76
77       dirtyread
78              Allow  reads  of  modified  but not yet committed data.  Usually
79              transactions are  isolated  to  prevent  other  operations  from
80              accessing  uncommitted  data.   This  option may improve perfor‐
81              mance, but may also return  inconsistent  results  if  the  data
82              comes  from  a transaction that is later aborted.  In this case,
83              the modified data is discarded  and  a  subsequent  search  will
84              return a different result.
85
86       idlcachesize <integer>
87              Specify  the  size of the in-memory index cache, in index slots.
88              The default is zero. A  larger  value  will  speed  up  frequent
89              searches  of indexed entries. An hdb database needs a large idl‐
90              cachesize for good search performance, typically three times the
91              cachesize (entry cache size) or larger.
92
93       index {<attrlist>|default} [pres,eq,approx,sub,<special>]
94              Specify the indexes to maintain for the given attribute (or list
95              of attributes).   Some  attributes  only  support  a  subset  of
96              indexes.   If only an <attr> is given, the indices specified for
97              default are maintained.  Note that setting a  default  does  not
98              imply  that  all attributes will be indexed. Also, for best per‐
99              formance, an eq  index  should  always  be  configured  for  the
100              objectClass attribute.
101
102              A  number  of  special  index  parameters may be specified.  The
103              index type sub can be decomposed  into  subinitial,  subany, and
104              subfinal  indices.   The special type nolang may be specified to
105              disallow use of this index by language  subtypes.   The  special
106              type  nosubtypes  may be specified to disallow use of this index
107              by  named  subtypes.    Note:   changing   index   settings   in
108              slapd.conf(5)  requires  rebuilding  indices,  see slapindex(8);
109              changing index settings dynamically by LDAPModifying "cn=config"
110              automatically causes rebuilding of the indices online in a back‐
111              ground task.
112
113       linearindex
114              Tell slapindex to index one attribute at a time. By default, all
115              indexed  attributes  in an entry are processed at the same time.
116              With this option, each indexed attribute is processed  individu‐
117              ally,  using  multiple  passes through the entire database. This
118              option improves slapindex performance  when  the  database  size
119              exceeds the dbcache size. When the dbcache is large enough, this
120              option is not needed and will  decrease  performance.   Also  by
121              default,  slapadd  performs  full  indexing  and  so  a separate
122              slapindex run is not needed. With this option, slapadd  does  no
123              indexing and slapindex must be used.
124
125       lockdetect {oldest|youngest|fewest|random|default}
126              Specify  which transaction to abort when a deadlock is detected.
127              The default is random.
128
129       mode <integer>
130              Specify the file protection mode  that  newly  created  database
131              index files should have.  The default is 0600.
132
133       searchstack <depth>
134              Specify  the  depth  of the stack used for search filter evalua‐
135              tion.  Search filters are evaluated on a  stack  to  accommodate
136              nested AND / OR clauses. An individual stack is assigned to each
137              server thread.  The depth of the stack determines how complex  a
138              filter  can be evaluated without requiring any additional memory
139              allocation. Filters that are nested deeper than the search stack
140              depth  will cause a separate stack to be allocated for that par‐
141              ticular search operation. These allocations  can  have  a  major
142              negative  impact  on server performance, but specifying too much
143              stack will also consume a great deal  of  memory.   Each  search
144              stack  uses 512K bytes per level. The default stack depth is 16,
145              thus 8MB per thread is used.
146
147       shm_key <integer>
148              Specify a key for a shared memory BDB  environment.  By  default
149              the  BDB  environment  uses  memory  mapped files. If a non-zero
150              value is specified, it will be used as the  key  to  identify  a
151              shared memory region that will house the environment.
152

ACCESS CONTROL

154       The bdb and hdb backends honor access control semantics as indicated in
155       slapd.access(5).
156

FILES

158       /etc/openldap/slapd.conf
159              default slapd configuration file
160
161       DB_CONFIG
162              Berkeley DB configuration file
163

SEE ALSO

165       slapd.conf(5), slapd(8), slapadd(8), slapcat(8), slapindex(8), Berkeley
166       DB documentation.
167
168
169
170OpenLDAP 2.3.34                    2007/2/16                      SLAPD-BDB(5)
Impressum