[erlang-questions] A problem with ETS + SMP

Bjorn Gustavsson bjorn@REDACTED
Thu Mar 27 08:25:18 CET 2008

"Gene Sher" <corticalcomputer@REDACTED> writes:

> The question is: Why does it slow down with smp activated when each of the
> processes has its own ets table?

The Erlang virtual machine needs to take two lock for each ets operation:
one lock on the table containing all ets tables, and one lock on the table
itself (since ets:info/1,2 may be called, the lock needs to be taken even
if the table is private).

We will likely try to optimize this in a future release.

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list