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

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Fri Jun 9 09:56:08 CEST 2017

On Fri, Jun 9, 2017 at 7:45 AM Frank Muller <frank.muller.erl@REDACTED>

> Hi Everyone,
> I've some troubles to understand the optimal settings for this little
> simple problem:
> Two Erlang processes A and B.
If you need the speed, then measure. If you only have two processes,
chances are that you can't measure any kind of difference really, because a
single RX mutex would be enough for you to handle both processes. The
read_concurrency and write_concurrency options tend to kick in at a certain
core count and two processes can at most invoke 2 cores, and even then the
chance is that they won't run at the same time in which case most of the
points here are moot.

Rule of thumb: a read or write to ETS takes less than 1us. So you can often
run about a million of them per second.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170609/8116149e/attachment.htm>

More information about the erlang-questions mailing list