Skip to content

SmpAllocator becomes less efficient when more than 128 CPUs are trying to use the allocator. #23594

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

Open
programmerjake opened this issue Apr 17, 2025 · 0 comments
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@programmerjake
Copy link

Zig Version

commit dc090e9

Steps to Reproduce and Observed Behavior

const max_thread_count = 128;

if you use a computer with more than 128 CPUs (e.g. a dual-socket AMD Epyc 9965 has 768 CPUs (counting each thread as a CPU)), then the allocator will make all additional threads busy-wait when more than 128 threads are in the allocator at any time.

Expected Behavior

dynamically adjust to higher CPU counts instead of using a static array.

@programmerjake programmerjake added the bug Observed behavior contradicts documented or intended behavior label Apr 17, 2025
@alexrp alexrp added enhancement Solving this issue will likely involve adding new logic or components to the codebase. standard library This issue involves writing Zig code for the standard library. and removed bug Observed behavior contradicts documented or intended behavior labels Apr 17, 2025
@alexrp alexrp added this to the 0.15.0 milestone Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

No branches or pull requests

2 participants