-
Notifications
You must be signed in to change notification settings - Fork 622
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
Better parallelism controls #2357
Comments
|
I'd also prefer to delegate decision to library how many threads to use, and if its even worth to the library, with simple flag if its enabled or no, with multi-threading enabled by default. |
I'd like to be able to limit max number of cores. I've got servers with 128 cores, and each library creating a threadpool for the entire core count makes everything an overkill. |
For deployment-time rather than coding-time thread count customization, I believe the |
Also, I'd expect we'd use the rayon global thread pool rather than creating our own. That seems like it would mitigate the issue by sharing the same threads with any other library that used rayon |
But I'd like to use max 4 cores for each image being decoded (there are diminishing results from splitting decoding further, and I don't want one job to monopolize the thread pool), but not have the whole 128-core server limited to 4 cores. |
Wait, doesn't rayon default to using the current thread pool? So if you call You'd have to keep track of a bunch of different thread pools, but that seems unavoidable if you're trying to subdivide 128 cores |
image
only provides therayon
compile-time feature for controlling parallelism. There are no runtime controls exposed, which means there isn't an obvious way to control things like:blur
function is too slow #986 could benefit, but unconditionally enabling parallelism would degrade performance for small images so we aren't using parallelism right now.The text was updated successfully, but these errors were encountered: