Mnesia Questions ...

Hakan Mattsson <>
Fri May 21 14:26:27 CEST 1999


On Tue, 18 May 1999, Claes Wikstrom wrote:

klacke>It's cool isn't it. Anyway, the memory consumption
klacke>of mnesia is easily measured, just creat a bunch of tables, populate
klacke>them, use the info functions in mnesia to see.

The info functions in Mnesia does not give the whole picture.
Currently you will only get the memory consumption of the main tables
and not the size of Mnesia's internal processes, indecies,
snmp-structures, checkpoints etc.

Of course it is possible to measure the total memory consumption of
Mnesia, but it is a little bit complicated. Measuring the size of
thethe entire Erlang emulator process is a rough method but it easy to
perform it.

klacke>The only situation where mnesia sucks from a memory consumption
klacke>perspective is the area of very large transactions.
klacke>
klacke>That is a transaction that writes very large amounts of data, particularly
klacke>if the target tables are replicated. 

One thing that may be worth to point out, is that many users relies on
Mnesia's ability to automatically acquire locks. This works well in
most cases, but if you in one transaction are accessing lots of
records in the same table both performance and memory consumption will
benifit a lot by explicit acquisition of table locks. If the
transcation is nested the benefit will even be greater.

/Håkan




More information about the erlang-questions mailing list