[CONTRIB] Add PopenWorker process recycling#11094
Conversation
|
Wonder what others think though? @shingjan ? |
|
Very interesting, we observe the same behaviour with PopenWorker during tuning and our workaround is also very similar. Would be happy to learn about how you guys figured out the problem and do you have any trace on the root cause or potential fix. A minimum reproducible example would also be appreciated! |
There was a problem hiding this comment.
Thanks for sending in this fix! Memory leak around PopenPool has been an issue identified in #11074. Does this fix imply that PopenExecutor underlying process will be a zombie process if used too many times? If so what is the best heuristic number for max_number_use?
|
Do we have an existing issue for the memory leak stuff? I think based on some internal data we suspect it's in |
|
Just created one #11096. |
|
@shingjan to be clear this change alone isn't enough to mitigate the leaks because the default is "never recycle" unless operations timeout. But specifying a value when initializing Of course, we should also try to fix the leaks :) |
AndrewZhaoLuo
left a comment
There was a problem hiding this comment.
Any objections? Otherwise will merge by eod
|
LGTM too! BTW, if |
|
Thanks @petersalas for bringing this workaround, and @AndrewZhaoLuo @shingjan @zxybazh for review and discussion :-)) |
* [CONTRIB] Add PopenWorker process recycling * Clarify docstrings Co-authored-by: Peter Salas <psalas@octoml.ai>
Background processes (e.g. builds during autotuning) can sometimes accumulate state or leak memory. This adds the ability for
PopenWorkerprocesses to optionally be recycled after a specified number of uses.