[erlang-questions] Concurrent read and write in an ETS table

Sverker Eriksson sverker.eriksson@REDACTED
Thu Jun 25 16:53:53 CEST 2015


I would think {write_concurrency, true} is best for your case.

read_concurrency makes read ops even cheaper but makes
switching between reading and writing more expensive. It will also
increase the constant memory footprint of the table.

/Sverker, Erlang/OTP

On 06/25/2015 04:35 PM, Luis Rascão wrote:
> Erlang's Factory 2014 video -- Eliminating Single Process Bottlenecks 
> with ETS Concurrency Patterns might help you
>
> https://youtu.be/XrkY9WRY8p0
>
> On Thu, Jun 25, 2015 at 10:53 AM, Avinash Dhumane 
> <nistrigunya@REDACTED <mailto:nistrigunya@REDACTED>> wrote:
>
>     I have an ETS table, where each object (in the table) is owned by
>     a separate process; i.e. there is one-to-one relation between the
>     object and its owner process. The object holds an externalized
>     state which the process uses in the event of crash recovery.
>
>     What options may I use, while instantiating the ETS table, in
>     order to allow all these processes to concurrently access (read
>     and write) their respective state?
>
>     Would setting {write_concurrency, true} and {read_concurrency,
>     true} suffice?
>
>     Thanks
>     Avinash
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
> -- 
> PGP fingerprint: F708 E141 AE8D 2D38 E1BC  DF3D 1719 3EA0 647D 7260
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150625/27d5696b/attachment.htm>


More information about the erlang-questions mailing list