mnesia
Contrast with ACID
The atomicity and the isolation properties of Mnesia are lost.
The isolation property is compromised, because other Erlang processes, which use transaction to manipulate the data, do not get the benefit of isolation if dirty operations simultaneously are used to read and write records from the same table.
async_dirty vs sync_dirty
The difference is that (in sync_dirty
) the operations are performed synchronously. The caller waits for the updates to be performed on all active replicas. Using mnesia:sync_dirty/1,2
is useful in the following cases:
When an application executes on several nodes and wants to be sure that the update is performed on the remote nodes before a remote process is spawned or a message is sent to a remote process.
When an application performs frequent or voluminous updates that can overload Mnesia on the nodes.
So, async_dirty
for pure reads, synd_dirty
for frequent, but fast writes? Not sure...
Implementation details
webMnesia consumption
webarchivedUrl
https://web.archive.org/web/20190927020856/https://erlang.org/~hakan/mnesia_consumption.txt
More from the same author
https://web.archive.org/web/20080611154654/http://www.erlang.org/~hakan/
Discusses
memory consumtion
system limits
disk consumption
Table index implementation
A table may have indices. Each index is represented as a table itself. In an
index table, tuples of {Attribute, PrimaryKey} are stored.
Disk consumption
If the same disk resident record is updated over and over again it becomes
really important to configure Mnesia to dump the transaction log rather
frequently, in order to reduce the disk consumption.