From 29946f8628df35f000e37e5db8782decfa44876b Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 21 May 2018 14:33:27 +0200 Subject: erts: Increase scalability of ets name lookup by expanding the default size of the hash table and increase number of locks. --- erts/emulator/beam/erl_db.c | 10 +++++++--- erts/emulator/beam/erl_db.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index a91a8d7c2e..5bae1730e4 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -322,10 +322,10 @@ erts_db_make_tid(Process *c_p, DbTableCommon *tb) /* ** The meta hash table of all NAMED ets tables */ -# define META_NAME_TAB_LOCK_CNT 16 +# define META_NAME_TAB_LOCK_CNT 256 union { erts_rwmtx_t lck; - byte _cache_line_alignment[64]; + byte align[ERTS_ALC_CACHE_LINE_ALIGN_SIZE(sizeof(erts_rwmtx_t))]; }meta_name_tab_rwlocks[META_NAME_TAB_LOCK_CNT]; static struct meta_name_tab_entry { union { @@ -3491,7 +3491,11 @@ void init_db(ErtsDbSpinCount db_spin_count) db_max_tabs, ((Uint)1)<