]> git.ipfire.org Git - thirdparty/pdns.git/blame - docs/backends/lmdb.rst
mark LMDB backend experimental
[thirdparty/pdns.git] / docs / backends / lmdb.rst
CommitLineData
c7a0a153
NC
1LMDB backend
2============
3
4* Native: Yes
5* Master: Yes
6* Slave: Yes
7* Superslave: No
8* Case: All lower
9* DNSSEC: Yes
10* Disabled data: No
11* Comments: No
12* Module name: lmdb
13* Launch name: ``lmdb``
14
dc4bb3b2
PD
15
16.. warning::
17 The LMDB backend is EXPERIMENTAL. Be prepared for incompatible changes between minor releases in the 4.2.x branch, and while tracking our git master.
18
c7a0a153
NC
19Enabling the backend
20--------------------
21
6737cb17 22When building PowerDNS yourself, append ``lmdb`` to ``--with-modules`` or ``--with-dynmodules``. It is expected that most pre-built packages contain this backend or be separately installable.
c7a0a153
NC
23
24
25Settings
26--------
27
28.. _setting-lmdb-filename:
29
30``lmdb-filename``
31^^^^^^^^^^^^^^^^^
32
33Path to the LMDB file (e.g. */var/spool/powerdns/pdns.lmdb*)
34
35.. warning::
36 On systemd systems,
6737cb17 37 When running PowerDNS via the provided systemd service file, `ProtectSystem <http://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=>`_ is set to ``full``, this means PowerDNS is unable to write to e.g. ``/etc`` and ``/home``, possibly being unable to write to the LMDB database.
c7a0a153
NC
38
39.. _setting-lmdb-shards:
40
41``lmdb-shards``
42^^^^^^^^^^^^^^^^^
43
6737cb17 44Records database will be split into this number of shards e.g. lmdb-shards=64
d3ee2140 45Default is 2 on 32 bits systems, and 64 on 64 bits systems.
c7a0a153
NC
46
47.. _setting-lmdb-sync-mode:
48
49``lmdb-sync-mode``
e1885b10 50^^^^^^^^^^^^^^^^^^
c7a0a153 51
f61541a1 52Synchronisation mode: sync, nosync, nometasync, mapasync
7055fa20 53Default: mapasync
c7a0a153 54
f61541a1 55* ``sync``: LMDB synchronous mode. Safest option, but also slightly slower. Can also be enabled with ``lmdb-sync-mode=``
cbc0d0cf 56* ``nosync``: don't flush systems buffers to disk when committing a transation.
6737cb17 57 This means a system crash can corrupt the database or lose the last transactions if buffers are not yet flushed to disk.
cbc0d0cf 58* ``nometasync``: flush system buffers to disk only once per transaction, omit the metadata flush. This maintains database integrity, but can potentially lose the last committed transaction if the operating system crashes.
7055fa20 59* ``mapasync``: (default). Use asynchronous flushes to disk. As with nosync, a system crash can then corrupt the database or lose the last transactions.
c7a0a153
NC
60
61
62LMDB Structure
63--------------
64
6737cb17
NC
65PowerDNS will create the database structure, no need to manually create the database schema.
66Also, it is not possible to directly query the LMDB DB, so recommendation is to use either the API, or pdnsutil.