Using the lmdb database backend: Difference between revisions

From SambaWiki
No edit summary
No edit summary
Line 9: Line 9:
| text=This is a hard limit and Samba will fail if this limit is exceeded. There is currently no way to resize a Samba LMBD database.
| text=This is a hard limit and Samba will fail if this limit is exceeded. There is currently no way to resize a Samba LMBD database.
}}
}}

== Notes ==
=== High virtual memory allocation ===
LMDB uses memory mapped files so if using the default database size of 8Gb the virtual memory reported by htop for Samba processes is typically 40Gb or 80Gb. This is normal and is not normally a concern, see the following article on
[https://symas.com/understanding-lmdb-database-file-sizes-and-memory-utilization/ lmdb memory utilisation and file sizes].

=== Database file sizes ===


=== Identifying an LMDB file ===
All Samba LMDB data files have an associated lock file with the extension <code>.ldb-lock</code> and the data file has a </code>.ldb</code> extension.

Revision as of 01:19, 1 April 2020

LMDB back end

Samba can use an LMDB back end instead of the default TDB back end. The LMDB back end permits database sizes greater than 4Gb.

Enabling LMDB

The LMDB backend can be enabled when provisioning or joining a domain using the --backend-store=mdb option. The maximum size of the database files defaults to 8Gb, this can be changed with the --backend-store-size

Notes

High virtual memory allocation

LMDB uses memory mapped files so if using the default database size of 8Gb the virtual memory reported by htop for Samba processes is typically 40Gb or 80Gb. This is normal and is not normally a concern, see the following article on lmdb memory utilisation and file sizes.

Database file sizes

Identifying an LMDB file

All Samba LMDB data files have an associated lock file with the extension .ldb-lock and the data file has a .ldb extension.