You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:...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 ofO(N^2)
open file descriptors as the number of workers grows. A total ofO(N)
is expected, so this issue tracks the objective of bringing it down from a quadratic behavior to linear.The text was updated successfully, but these errors were encountered: