What is the maximum size of a Citadel message store?
Citadel uses a high-performance NoSQL data store with pluggable backends. Modern installations default to
LMDB (Lightning Memory-Mapped Database), while Berkeley DB remains supported
for existing deployments. On modern 64-bit platforms, both storage engines provide capacity ceilings far beyond
the requirements of even the largest enterprise messaging environments.
LMDB (Default)
LMDB is the default storage engine for Citadel. Because LMDB is a memory-mapped database, its maximum database size
on 64-bit architectures is governed by the virtual address space of the CPU architecture and operating system:
- Theoretical Limit: On common 64-bit architectures (x86_64 and AArch64/ARM64) implementing standard 48-bit virtual addressing, the maximum memory map size is 128 Terabytes (TB) for a single database environment. On newer systems utilizing 5-level paging (57-bit virtual address space), theoretical addressability extends up to 128 Petabytes (PB).
- Sparse Allocation: On Linux and Unix-like operating systems, LMDB allocates virtual address space using sparse files. Configuring a multi-terabyte map size does not allocate physical disk blocks or consume RAM until actual data is written.
- Dynamic Growth: The virtual memory map size can be expanded as database volume increases, ensuring continuous operation.
Berkeley DB
For installations running on Berkeley DB, store capacity is determined by Berkeley DB's page-addressing architecture:
- Theoretical Maximum: Berkeley DB supports up to 232 (approx. 4.29 billion) pages per database file. At Berkeley DB's maximum page size of 64 KB, a single table can reach up to 256 Terabytes (TB).
- Standard Page Sizes: With standard 4 KB or 8 KB database pages, the per-file limit ranges from 16 TB to 32 TB.
Practical Limits in Production
In real-world deployments, Citadel's message store size is not constrained by database architecture. Instead, practical limits are dictated by:
- The physical storage capacity of your disks or arrays.
- Filesystem limits (modern filesystems such as ext4, XFS, Btrfs, and ZFS scale into the petabyte and exabyte ranges).
- Maintenance considerations, such as backup time windows, snapshot replication bandwidth, and disaster recovery procedures.