SLAPD-MDB(5)
π SLAPD-MDB(5) π
okay bestie, so this is the manual page for slapd-mdb, a.k.a. the Memory-Mapped DB backend to slapd β and yes it lives in the File Formats Manual, section 5, because that's just where it belongs π
β¨ NAME β¨
slapd-mdb β Memory-Mapped DB backend to slapd π§
πΈ SYNOPSIS πΈ
/etc/openldap/slapd.conf
π¦ DESCRIPTION π¦
The mdb backend to slapd(8) uses OpenLDAP's Lightning Memory-Mapped DB (LMDB) library to store data. It relies completely on the underlying operating system for memory management and does no caching of its own, like, zero, none, it's giving minimalist king energy π
It is the recommended primary database backend. Periodt.
The mdb backend uses a hierarchical database layout which supports subtree renames. slay.
π CONFIGURATION π
These slapd.conf options apply to the mdb backend. That is, they must follow a "backend mdb" line and come before any subsequent "backend" or "database" lines. no skipping the line order bestie, the parser is not flexible π
idlexp <exp>β Specify a power of 2 for the maximum size of an index slot. The default is16, yielding a maximum slot size of2^16or65536. Once set, this option applies to everymdbdatabase instance. The specified value must be in the range of16-30.
These slapd.conf options apply to the mdb backend database. That is, they must follow a "database mdb" line and come before any subsequent "backend" or "database" lines. Other database options are described in the slapd.conf(5) manual page. (go read that one too, it's the sibling π)
checkpoint <kbyte> <min>β Specify the frequency for flushing the database disk buffers. This setting is only needed if thedbnosyncoption is used. The checkpoint will occur if either<kbyte>data has been written or<min>minutes have passed since the last checkpoint. Both arguments default to zero, in which case they are ignored. When the<min>argument is non-zero, an internal task will run every<min>minutes to perform the checkpoint.
Note: currently the <kbyte> setting is unimplemented. π it's just sitting there, unfulfilled.
dbnosyncβ Specify that on-disk database contents should not be immediately synchronized with in memory changes. Enabling this option may improve performance at the expense of data security. In particular, if the operating system crashes before changes are flushed, some number of transactions may be lost. By default, a full data flush/sync is performed when each transaction is committed.
lowkey risky bestie. speed vs safety, pick your fighter π«Ά
dbpagesize <bytes>β Specify the page size to use for the database, in bytes. The default depends on the underlying filesystem's block size (typically4096or8192). The value must be a power of two and the maximum is65536. This setting usually should not need to be changed, but setting a larger pagesize also increases the maximum length of keys so it may be useful to support longer values whenmultivalis used. This setting only takes effect when a database is being newly created.directory <directory>β Specify the directory where the LMDB files containing this database and associated indexes live. A separate directory must be specified for each database. The default is/var/lib/openldap/openldap-data.envflags {nosync,nometasync,writemap,mapasync,nordahead}β Specify flags for finer-grained control of the LMDB library's operation. the girlies love granular control β¨nosyncβ This is exactly the same as thedbnosyncdirective.nometasyncβ Flush the data on a commit, but skip the sync of the meta page. This mode is slightly faster than doing a full sync, but can potentially lose the last committed transaction if the operating system crashes. If bothnometasyncandnosyncare set, thenosyncflag takes precedence.writemapβ Use a writable memory map instead of just read-only. This speeds up write operations but makes the database vulnerable to corruption in case any bugs inslapdcause stray writes into the mmap region. πmapasyncβ When using a writable memory map and performing flushes on each commit, use an asynchronous flush instead of a synchronous flush (the default). This option has no effect ifwritemaphas not been set. It also has no effect ifnosyncis set.nordaheadβ Turn off file readahead. Usually the OS performs readahead on every read request. This usually boosts read performance but can be harmful to random access read performance if the system's memory is full and the DB is larger than RAM. This option is not implemented on Windows.
index {<attrlist>|default} [pres,eq,approx,sub,<special>]β Specify the indexes to maintain for the given attribute (or list of attributes). Some attributes only support a subset of indexes. If only an<attr>is given, the indices specified fordefaultare maintained. Note that setting adefaultdoes not imply that all attributes will be indexed. Also, aneqindex is always implicitly configured for theobjectClassattribute and any attempts to change this index are ignored. (it said what it said π )
A number of special index parameters may be specified. The index type sub can be decomposed into subinitial, subany, and subfinal indices. The special type nolang may be specified to disallow use of this index by language subtypes. The special type nosubtypes may be specified to disallow use of this index by named subtypes.
Note: changing index settings inslapd.conf(5)requires rebuilding indices, seeslapindex(8); changing index settings dynamically by LDAPModifying"cn=config"automatically causes rebuilding of the indices online in a background task. no downtime bestie, we love to see it π«Ά
maxentrysize <bytes>β Specify the maximum size of an entry in bytes. Attempts to store an entry larger than this size will be rejected with the errorLDAP_ADMINLIMIT_EXCEEDED. The default is0, which is unlimited.maxreaders <integer>β Specify the maximum number of threads that may have concurrent read access to the database. Tools such asslapcatcount as a single thread, in addition to threads in any activeslapdprocesses. The default is126.maxsize <bytes>β Specify the maximum size of the database in bytes. A memory map of this size is allocated at startup time and the database will not be allowed to grow beyond this size. The default is10485760bytes. This setting may be changed upward if the configured limit needs to be increased.
Note: It is important to set this to as large a value as possible, (relative to anticipated growth of the actual data over time) since growing the size later may not be practical when the system is under heavy load. plan ahead queen π
mode <integer>β Specify the file protection mode that newly created database files should have. The default is0600.multival {<attrlist>|default} <integer hi>,<integer lo>β Specify the number of values for which a multivalued attribute is stored in a separate table. Normally entries are stored as a single blob inside the database. When an entry gets very large or contains attributes with a very large number of values, modifications on that entry may get very slow. Splitting the large attributes out to a separate table can improve the performance of modification operations. The threshold is specified as a pair of integers. If the number of values exceeds thehithreshold the values will be split out. If a modification deletes enough values to bring an attribute below thelothreshold the values will be removed from the separate table and merged back into the main entry blob. The threshold can be set for a specific list of attributes, or thedefaultcan be configured for all other attributes. The default value for bothhiandlothresholds isUINT_MAX, which keeps all attributes in the main blob.rtxnsize <entries>β Specify the maximum number of entries to process in a single read transaction when executing a large search. Long-lived read transactions prevent old database pages from being reused in write transactions, and so can cause significant growth of the database file when there is heavy write traffic. This setting causes the read transaction in large searches to be released and reacquired after the given number of entries has been read, to give writers the opportunity to reclaim old database pages. The default is10000.searchstack <depth>β Specify the depth of the stack used for search filter evaluation. Search filters are evaluated on a stack to accommodate nestedAND/ORclauses. An individual stack is assigned to each server thread. The depth of the stack determines how complex a filter can be evaluated without requiring any additional memory allocation. Filters that are nested deeper than the search stack depth will cause a separate stack to be allocated for that particular search operation. These allocations can have a major negative impact on server performance, but specifying too much stack will also consume a great deal of memory. Each search stack uses512Kbytes per level. The default stack depth is16, thus8MBper thread is used.crypto <module>β Load an encryption module to use for encrypting the database. The LMDB source code includes an example encryption module. By default there is no encryption.passphrase <pass>β The passphrase to use for encrypting the database. Thecryptomodule must also be configured. (yes bestie, both of them, they're a package deal π)
π ACCESS CONTROL π
The mdb backend honors access control semantics as indicated in slapd.access(5). so go off, configure your ACLs, the backend respects them π
π FILES π
/etc/openldap/slapd.confβ defaultslapdconfiguration file
π SEE ALSO π
slapd.conf(5), slapd-config(5), slapd(8), slapadd(8), slapcat(8), slapindex(8), slapmodify(8), OpenLDAP LMDB documentation.
π ACKNOWLEDGEMENTS π
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from the University of Michigan LDAP 3.3 Release. Written by Howard Chu. π
and that's the whole thing bestie π«Ά this page is OpenLDAP 2.7.2, dated 2026/10/21 β go forth and map some memory, you absolute icon πβ¨
π¦ where this page comes from
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- Copyright 2011-2026 The OpenLDAP Foundation All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms