[erlang-questions] Using ram-only mnesia in place of gen_server+ets table

Shayan Pooya shayan@REDACTED
Thu Jul 17 22:42:48 CEST 2014


Disco filesystem gc involves a step in which a process builds an ets table
on the master and
the slave nodes query this ets table regularly afterwards.
The ets table is owned by a gen_server which responds to the queries from
the
slaves using this ets table.

I am experimenting with using a mnesia table instead of this ets table so
that
the gen_server is not involved in this operation (There are a lot of
queries and
this master process is a bottleneck).
This is a ram-only mnesia table which is created and then made read-only.
All of
the operations use mnesia:dirty_* functions and the slave nodes never
modify the
table.

1. Is this going to avoid the gen_server bottleneck?
2. I am thinking of adding all of the nodes (master + slaves) as the
ram-copies for
this table in order to have local lookups on the slave nodes.
Is this going to slow down the creation of the mnesia table? (as
said before, it is only using dirty_* functions for modifying the table).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140717/c3813fa0/attachment.htm>


More information about the erlang-questions mailing list