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

AAP-37500 Excessive number of open file descriptors #39

Open
AlanCoding opened this issue Jan 3, 2025 · 0 comments
Open

AAP-37500 Excessive number of open file descriptors #39

AlanCoding opened this issue Jan 3, 2025 · 0 comments
Labels
awx needed for AWX MVP minimum set of issues to fix

Comments

@AlanCoding
Copy link
Member

https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

The multiprocessing lib default start method (which is implicitly used here) is fork. If you look at the docs for spawn, it says this:

In particular, unnecessary file descriptors and handles from the parent process will not be inherited.

...implying that file descriptors are inherited by the child processors when using fork. The consequence is predictable, and the same for both the old dispatcher and the current state of this library. Every worker will inherit O(N) file descriptors as the parent process has an open connection to each existing worker. This leads to a total of O(N^2) open file descriptors as the number of workers grows. A total of O(N) is expected, so this issue tracks the objective of bringing it down from a quadratic behavior to linear.

@AlanCoding AlanCoding added awx needed for AWX MVP minimum set of issues to fix labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awx needed for AWX MVP minimum set of issues to fix
Projects
None yet
Development

No branches or pull requests

1 participant