[erlang-questions] MNesia Distribution Questions

Ulf Wiger ulf.wiger@REDACTED
Thu Oct 22 08:15:15 CEST 2009


Ngoc Dao wrote:
> Mnesia has 4 GB (or 2 GB?) limit per node. Is there a tutorial or doc
> about how to create fragmented Mnesia DB, so that a very big DB can be
> cut into pieces and saved on many nodes?

Strictly speaking, Mnesia has no such limit.

- The 32-bit VM can only address 4 GB of RAM

- Normal linux kernels give the application 3 GB to use.
   You can get past this using a largekernel.

- Dets can address 2GB


This means that for 32-bit Erlang:
- The total amount of data residing in mnesia
   ram_copies or disc_copies on a given node cannot
   exceed 3GB or 4GB, depending on the OS.

- The size of a disc_only copies table fragment* cannot
   exceed 2GB.

For 64-bit Erlang, the restriction on disc_only_copies
remains, but RAM tables can be much, much bigger.
However, most data types will take up twice as much space
in 64-bit as in 32-bit. Binaries are one notable exception.

* Tables can be fragmented using mnesia_frag. If not fragmented,
the 'table fragment' will be the entire table.

BR,
Ulf W
-- 
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com


More information about the erlang-questions mailing list