Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Multiple Arenas per jemalloc Pool #1076

Closed
lplewa opened this issue Feb 4, 2025 · 0 comments · Fixed by #1214
Closed

Use Multiple Arenas per jemalloc Pool #1076

lplewa opened this issue Feb 4, 2025 · 0 comments · Fixed by #1214

Comments

@lplewa
Copy link
Contributor

lplewa commented Feb 4, 2025

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

lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 20, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 20, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 20, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 20, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 20, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 20, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 20, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 21, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 25, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 25, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 25, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 25, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 25, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 25, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 26, 2025
lplewa added a commit to lplewa/unified-memory-framework that referenced this issue Mar 26, 2025
@lplewa lplewa closed this as completed in ff95168 Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant