Closed
Description
Currently, we use only a single arena per jemalloc pool. However, jemalloc arenas are designed to reduce lock contention. Restricting ourselves to one arena forces all threads to synchronize on the same lock. To alleviate this, we should create multiple arenas per pool—by default, one arena per CPU thread (though whether to strictly match CPU thread count is debatable, see CTL #1036).
A similar approach has already been used in memkind. You can find an example implementation here:
https://github.com/memkind/memkind/blob/fb7de4a5e4cd2c48ccc2aba209d01bb6c9035707/src/memkind_arena.c#L757
Metadata
Metadata
Assignees
Labels
No labels