-
-
Notifications
You must be signed in to change notification settings - Fork 96
Minimize the threadpool for client commands #2193
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
Conversation
Running many sub-commands in parallel can quickly result in very large numbers of threads being created. This can become a problem when these processes are in a restricted environment, and some start receiving "resource unavailable" errors. We can mitigate the problem by using only the minimum amount of workers for client commands, which don't need a these resources anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial thoughts. Will do some tests locally with this as well to see if any client commands run into issues now. There's always at least two actors running if we have a remote connection, so I'd like to test whether the new default should be 2 rather than 1.
Co-authored-by: Dominik Lohmann <mail@dominiklohmann.de>
afa0d99
to
cf96f46
Compare
Testing revealed that import commands would easily get stuck if only one thread is availble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually improved performance for client commands for me a noticeable bit. Thanks!
Running many sub-commands in parallel can quickly result in very large numbers of threads being created. This can become a problem when these processes are in a restricted environment, and some start receiving "resource unavailable" errors. We can mitigate the problem by using only the minimum amount of workers for client commands, which don't need a these resources anyways.
📝 Checklist
🎯 Review Instructions