[erlang-questions] ets:update_counter/3 optimal settings

Frank Muller frank.muller.erl@REDACTED
Fri Jun 9 07:44:56 CEST 2017


Hi Everyone,

I've some troubles to understand the optimal settings for this little
simple problem:

Two Erlang processes A and B.

1. Process A randomly increments a counter during its lifetime using "ets
:update_counter/3"

2. Process B reads the counter every X seconds and reset it to 0.

I decided to use these options when creating the table:

{write_concurrency, true}, %% A and B
{read_concurrency, false}  %% only B

Are these settings correct and more importantly "optimal" (please elaborate
your answer)?

/Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170609/f7de8c13/attachment.htm>


More information about the erlang-questions mailing list