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

Add arg for worker threads & fix stats init #365

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Conversation

plajjan
Copy link
Contributor

@plajjan plajjan commented Nov 17, 2021

We now have a configurable number of worker threads although we still
default to the number of detects CPU cores (logical cores a.k.a. threads
really). This makes it possible to just play around with what happens
with lower count or whatever.

The fixed number of max worker threads (32) was rather low. It's bumped
up to 256, now using a single define MAX_WTHREADS so it is consistent
and easy to change. There is also a check that we don't actually try to
run with a higher number.

Alternatively I guess we could malloc this structure but I dunno... this
just felt simple.

We now have a configurable number of worker threads although we still
default to the number of detects CPU cores (logical cores a.k.a. threads
really). This makes it possible to just play around with what happens
with lower count or whatever.

The fixed number of max worker threads (32) was rather low. It's bumped
up to 256, now using a single define MAX_WTHREADS so it is consistent
and easy to change. There is also a check that we don't actually try to
run with a higher number.

Alternatively I guess we could malloc this structure but I dunno... this
just felt simple.
@plajjan plajjan merged commit b70f3df into main Nov 17, 2021
@plajjan plajjan deleted the configurable-wthreads branch November 17, 2021 20:52
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 this pull request may close these issues.

None yet

1 participant