]> git.ipfire.org Git - thirdparty/pdns.git/blob - docs/backends/lmdb.rst
mark LMDB backend experimental
[thirdparty/pdns.git] / docs / backends / lmdb.rst
1 LMDB 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
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
19 Enabling the backend
20 --------------------
21
22 When 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.
23
24
25 Settings
26 --------
27
28 .. _setting-lmdb-filename:
29
30 ``lmdb-filename``
31 ^^^^^^^^^^^^^^^^^
32
33 Path to the LMDB file (e.g. */var/spool/powerdns/pdns.lmdb*)
34
35 .. warning::
36 On systemd systems,
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.
38
39 .. _setting-lmdb-shards:
40
41 ``lmdb-shards``
42 ^^^^^^^^^^^^^^^^^
43
44 Records database will be split into this number of shards e.g. lmdb-shards=64
45 Default is 2 on 32 bits systems, and 64 on 64 bits systems.
46
47 .. _setting-lmdb-sync-mode:
48
49 ``lmdb-sync-mode``
50 ^^^^^^^^^^^^^^^^^^
51
52 Synchronisation mode: sync, nosync, nometasync, mapasync
53 Default: mapasync
54
55 * ``sync``: LMDB synchronous mode. Safest option, but also slightly slower. Can also be enabled with ``lmdb-sync-mode=``
56 * ``nosync``: don't flush systems buffers to disk when committing a transation.
57 This means a system crash can corrupt the database or lose the last transactions if buffers are not yet flushed to disk.
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.
59 * ``mapasync``: (default). Use asynchronous flushes to disk. As with nosync, a system crash can then corrupt the database or lose the last transactions.
60
61
62 LMDB Structure
63 --------------
64
65 PowerDNS will create the database structure, no need to manually create the database schema.
66 Also, it is not possible to directly query the LMDB DB, so recommendation is to use either the API, or pdnsutil.