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

Frank Muller frank.muller.erl@REDACTED
Fri Jun 9 10:13:06 CEST 2017


Thanks Jesper!

/Frank

Le ven. 9 juin 2017 à 09:56, Jesper Louis Andersen <
jesper.louis.andersen@REDACTED> a écrit :

> On Fri, Jun 9, 2017 at 7:45 AM Frank Muller <frank.muller.erl@REDACTED>
> wrote:
>
>> 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/26df8848/attachment.htm>


More information about the erlang-questions mailing list