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

[Feature request] Controling the number of thread being used #47

Open
kirianguiller opened this issue Mar 3, 2022 · 3 comments
Open
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@kirianguiller
Copy link

Hello the ungoliant team,

I would like to know if it's possible to have as a parameter the number of thread that we would like to use for a given step? (for instance the pipeline step). By default, if the parameter is not provided, it would use all the thread, and if a number of thread, below the number of available of thread of the machine, is provided, it would only use this number ?

Thanks a lot !!

@kirianguiller kirianguiller added the enhancement New feature or request label Mar 3, 2022
@Uinelj Uinelj assigned Uinelj and unassigned pjox Mar 3, 2022
@Uinelj
Copy link
Member

Uinelj commented Mar 4, 2022

Since ungoliant uses rayon as a library for easy parallel programming, you can use an environment variable setting the number of (logical) threads used by the program.

As an example, using RAYON_NUM_THREADS=1 ungoliant pipeline .....will limit the number of threads to 1.

I'll add a -J in the next release so that the setting is more ergonomic.

Thank you for the report :)

@Uinelj Uinelj added this to the v1.3.1 milestone Mar 4, 2022
@kirianguiller
Copy link
Author

Thank you so much @Uinelj ! It's really helpful. I will use the env variable export for now then :).
Do you want I close the issue ? Or maybe you want to wait to have the -J implemented in the next release before closing the request ?

Thanks again !

@Uinelj
Copy link
Member

Uinelj commented Mar 4, 2022

I'll use the issue to track the implementaton of the feature :)

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

No branches or pull requests

3 participants