[erlang-patches] Improve mnesia_locker for large amounts of locks in the same transaction

Tobias Lindahl <>
Mon May 26 15:26:02 CEST 2014

I've found that taking a large amount (from 1000 and upwards) of mnesia
locks in the same transaction scales poorly. It seems to boil down to
mnesia_locker keeping a bag ets table to store the reference between a
transaction id (TID) and all locks held by the transaction.

Changing the ets table to an ordered set table, and tweaking the code to
preserve the same semantics seems to dramatically improve the scaling.

If you need a test program to show the effect, just tell me.



git fetch :gorillainduction/otp.git

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140526/b03a055d/attachment.html>

More information about the erlang-patches mailing list