[erlang-questions] ETS’s performances and limits?

Sverker Eriksson sverker@REDACTED
Tue Sep 4 20:55:15 CEST 2018

On sön, 2018-09-02 at 01:29 +0200, Valentin Micic wrote:
> There is a good chance that performance degradation you are referring to may
> *not* be related to a "heavier concurrency" as much as it may be caused by a
> rate of inserts into a table of type "ordered_set". The manual indicates that
> ordered_set tables do behave differently "in come situations" (which I read as
> "insert operations when a table gets big").

The paragraph containing "different behavior in some situations" is about the
semantic differences for ordered_set due to keys compared with arithmetic ==
instead of matching =:= as the other table types.

Performance wise ordered_set use AVL trees with O(log N) for
lookup/insert/delete while the others use linear hashing with O(1).

ordered_set does also not implement option 'write_concurrency'. Every mutating
operation on an ordered_set will seize exclusive write lock on the entire table.
This will most probably improve as we are expecting a very exciting pull request
in a near future implementing 'write_concurrency' for ordered_set.

/Sverker, Erlang/OTP @ Ericsson

More information about the erlang-questions mailing list