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

NAME

6       slapd-mdb - Memory-Mapped DB backend to slapd
7

SYNOPSIS

9       /etc/openldap/slapd.conf
10

DESCRIPTION

12       The  mdb backend to slapd(8) uses OpenLDAP's Lightning Memory-Mapped DB
13       (LMDB) library to store data.  It relies completely on  the  underlying
14       operating  system for memory management and does no caching of its own.
15       It is the recommended primary database backend.
16
17       The mdb backend is similar to the hdb backend in that it uses a hierar‐
18       chical  database layout which supports subtree renames. It is both more
19       space-efficient and more  execution-efficient  than  the  bdb  backend,
20       while being overall much simpler to manage.
21

CONFIGURATION

23       These  slapd.conf  options apply to the mdb backend database.  That is,
24       they must follow a "database mdb" line and come before  any  subsequent
25       "backend" or "database" lines.  Other database options are described in
26       the slapd.conf(5) manual page.
27
28       checkpoint <kbyte> <min>
29              Specify the frequency for flushing the  database  disk  buffers.
30              This setting is only needed if the dbnosync option is used.  The
31              checkpoint will occur if either <kbyte> data has been written or
32              <min> minutes have passed since the last checkpoint.  Both argu‐
33              ments default to zero, in which case they are ignored. When  the
34              <min>  argument  is  non-zero,  an  internal task will run every
35              <min> minutes to perform the checkpoint.   Note:  currently  the
36              <kbyte> setting is unimplemented.
37
38       dbnosync
39              Specify that on-disk database contents should not be immediately
40              synchronized with in memory changes.  Enabling this  option  may
41              improve performance at the expense of data security. In particu‐
42              lar, if the operating system crashes before changes are flushed,
43              some  number  of  transactions  may be lost.  By default, a full
44              data flush/sync is performed when each transaction is committed.
45
46       directory <directory>
47              Specify the directory where the LMDB files containing this data‐
48              base  and associated indexes live.  A separate directory must be
49              specified for each database.  The default is /var/openldap-data.
50
51       envflags {nosync,nometasync,writemap,mapasync,nordahead}
52              Specify flags for finer-grained control of  the  LMDB  library's
53              operation.
54
55              nosync This is exactly the same as the dbnosync directive.
56
57              nometasync
58                     Flush the data on a commit, but skip the sync of the meta
59                     page. This mode is slightly  faster  than  doing  a  full
60                     sync,  but can potentially lose the last committed trans‐
61                     action if the operating system crashes. If  both  nometa‐
62                     sync  and  nosync  are  set, the nosync flag takes prece‐
63                     dence.
64
65              writemap
66                     Use a writable memory map instead of just read-only. This
67                     speeds up write operations but makes the database vulner‐
68                     able to corruption in case any bugs in slapd cause  stray
69                     writes into the mmap region.
70
71              mapasync
72                     When  using  a writable memory map and performing flushes
73                     on each commit, use an asynchronous flush  instead  of  a
74                     synchronous  flush  (the  default).  This  option  has no
75                     effect if writemap has not  been  set.  It  also  has  no
76                     effect if nosync is set.
77
78              nordahead
79                     Turn  off  file readahead. Usually the OS performs reada‐
80                     head on every read request. This usually boosts read per‐
81                     formance but can be harmful to random access read perfor‐
82                     mance if the system's memory is full and the DB is larger
83                     than RAM. This option is not implemented on Windows.
84
85
86       index {<attrlist>|default} [pres,eq,approx,sub,<special>]
87              Specify the indexes to maintain for the given attribute (or list
88              of attributes).   Some  attributes  only  support  a  subset  of
89              indexes.   If only an <attr> is given, the indices specified for
90              default are maintained.  Note that setting a  default  does  not
91              imply  that  all attributes will be indexed. Also, for best per‐
92              formance, an eq  index  should  always  be  configured  for  the
93              objectClass attribute.
94
95              A  number  of  special  index  parameters may be specified.  The
96              index type sub can be decomposed  into  subinitial,  subany, and
97              subfinal  indices.   The special type nolang may be specified to
98              disallow use of this index by language  subtypes.   The  special
99              type  nosubtypes  may be specified to disallow use of this index
100              by  named  subtypes.    Note:   changing   index   settings   in
101              slapd.conf(5)  requires  rebuilding  indices,  see slapindex(8);
102              changing index settings dynamically by LDAPModifying "cn=config"
103              automatically causes rebuilding of the indices online in a back‐
104              ground task.
105
106       maxreaders <integer>
107              Specify the maximum number of threads that may  have  concurrent
108              read  access  to  the database. Tools such as slapcat count as a
109              single thread, in addition to threads in any active  slapd  pro‐
110              cesses. The default is 126.
111
112       maxsize <bytes>
113              Specify  the maximum size of the database in bytes. A memory map
114              of this size is allocated at startup time and the database  will
115              not be allowed to grow beyond this size. The default is 10485760
116              bytes. This setting may be  changed  upward  if  the  configured
117              limit needs to be increased.
118
119              Note:  It is important to set this to as large a value as possi‐
120              ble, (relative to anticipated growth of  the  actual  data  over
121              time) since growing the size later may not be practical when the
122              system is under heavy load.
123
124       mode <integer>
125              Specify the file protection mode  that  newly  created  database
126              files should have.  The default is 0600.
127
128       rtxnsize <entries>
129              Specify  the  maximum  number  of entries to process in a single
130              read transaction when executing a large search. Long-lived  read
131              transactions  prevent  old  database  pages from being reused in
132              write transactions, and so can cause significant growth  of  the
133              database  file  when  there is heavy write traffic. This setting
134              causes the read transaction in large searches to be released and
135              reacquired  after  the given number of entries has been read, to
136              give writers the opportunity to reclaim old database pages.  The
137              default is 10000.
138
139       searchstack <depth>
140              Specify  the  depth  of the stack used for search filter evalua‐
141              tion.  Search filters are evaluated on a  stack  to  accommodate
142              nested AND / OR clauses. An individual stack is assigned to each
143              server thread.  The depth of the stack determines how complex  a
144              filter  can be evaluated without requiring any additional memory
145              allocation. Filters that are nested deeper than the search stack
146              depth  will cause a separate stack to be allocated for that par‐
147              ticular search operation. These allocations  can  have  a  major
148              negative  impact  on server performance, but specifying too much
149              stack will also consume a great deal  of  memory.   Each  search
150              stack  uses 512K bytes per level. The default stack depth is 16,
151              thus 8MB per thread is used.
152

ACCESS CONTROL

154       The mdb  backend  honors  access  control  semantics  as  indicated  in
155       slapd.access(5).
156

FILES

158       /etc/openldap/slapd.conf
159              default slapd configuration file
160

SEE ALSO

162       slapd.conf(5),   slapd-config(5),   slapd(8),  slapadd(8),  slapcat(8),
163       slapindex(8), OpenLDAP LMDB documentation.
164

ACKNOWLEDGEMENTS

166       OpenLDAP Software is developed and maintained by The  OpenLDAP  Project
167       <http://www.openldap.org/>.   OpenLDAP Software is derived from Univer‐
168       sity of Michigan LDAP 3.3 Release.  Written by Howard Chu.
169
170
171
172OpenLDAP 2.4.44                   2016/02/05                      SLAPD-MDB(5)
Impressum