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

Default to using multi-threading #18

Open
kesyog opened this issue Feb 4, 2022 · 1 comment · May be fixed by #19
Open

Default to using multi-threading #18

kesyog opened this issue Feb 4, 2022 · 1 comment · May be fixed by #19

Comments

@kesyog
Copy link

kesyog commented Feb 4, 2022

For the sake of ergonomics and performance, IMO the default number of threads should be the number of CPU's. In my experience, the cases where single-threaded behavior is required are the exception, not the rule, and users can explicitly opt in for single-threaded behavior if needed.

This would indirectly solve a different issue: the only way to automatically peg the number of threads to the number of CPU's is to set --worker 0 --threads 0 even though the worker argument is listed as deprecated.

kesyog added a commit to kesyog/rargs that referenced this issue Feb 4, 2022
To increase performance with the default settings, default to using one
thread per CPU. The user must explicitly opt out if they want
single-threaded behavior.

This indirectly solves a different issue: the only way to automatically
peg the number of threads to the number of CPU's was to set
`--worker 0 --threads 0` even though the `worker` argument had been
deprecated.

Fixes lotabout#18
kesyog added a commit to kesyog/rargs that referenced this issue Feb 4, 2022
To increase performance with the default settings, default to using one
thread per CPU. The user must explicitly opt out if they want
single-threaded behavior.

This indirectly solves a different issue: the only way to automatically
peg the number of threads to the number of CPU's was to set
`--worker 0 --threads 0` even though the `worker` argument had been
deprecated.

Fixes lotabout#18
@kesyog kesyog linked a pull request Feb 4, 2022 that will close this issue
kesyog added a commit to kesyog/rargs that referenced this issue Feb 4, 2022
To increase performance with the default settings, default to using one
thread per CPU. The user must explicitly opt out if they want
single-threaded behavior.

This indirectly solves a different issue: the only way to automatically
peg the number of threads to the number of CPU's was to set
`--worker 0 --threads 0` even though the `worker` argument had been
deprecated.

Fixes lotabout#18
@kesyog
Copy link
Author

kesyog commented Feb 16, 2022

Hey @lotabout, I'm curious what you think about this issue and the linked PR. I think it's a great ergonomics improvement, as 99% (if not 100%) of my use cases for rargs/xargs are trivially parallel.

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 a pull request may close this issue.

1 participant