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 PARALLEL_PROCESSOR_COUNT to override nprocessors when setting number_of_workers #1224

Closed
GoodForOneFare opened this issue Oct 12, 2022 · 0 comments · Fixed by #1475
Closed
Labels
enhancement New feature or request

Comments

@GoodForOneFare
Copy link
Member

Tapioca currently factors Etc.nprocessors into its worker count calculation:

@number_of_workers = T.let(
number_of_workers || [Etc.nprocessors, (queue.length.to_f / MINIMUM_ITEMS_PER_WORKER).ceil].min,
Integer,
)

However, the parallel gem currently prioritizes ENV['PARALLEL_PROCESSOR_COUNT'] above nprocessors. This affects environments like Spin, where most gems pick up the processor count and limit their process usage accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants