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

Allow more than 1024 threads on high-end machines #5929

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robertnurnberg
Copy link
Contributor

@robertnurnberg robertnurnberg commented Mar 14, 2025

This PR changes the maximum value for Threads from the constant 1024 to four times the number of available processors.

This follows some discussion on discord.

No functional change.

@vondele
Copy link
Member

vondele commented Mar 14, 2025

I suggest to use
int MaxThreads = std::max(1024, 4 * int(get_hardware_concurrency()));

So we don't 'regress' in the shown number of threads. The constant 4 is fine with me.

@Disservin
Copy link
Member

also move it just below the MaxHashMB thanks

@robertnurnberg robertnurnberg marked this pull request as ready for review March 14, 2025 19:30
@robertnurnberg
Copy link
Contributor Author

Thanks for the feedback. Implemented both suggestions.

Copy link

clang-format 18 needs to be run on this PR.
If you do not have clang-format installed, the maintainer will run it when merging.
For the exact version please see https://packages.ubuntu.com/noble/clang-format-18.

(execution 13864034864 / attempt 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants