Author oesteban
Recipients 4-launchpad-kalvdans-no-ip-org, oesteban, pitrou
Date 2018-12-17.21:12:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks for your response.

The idea would be to enable ``subprocess.Popen`` to use an existing fork server in its fork_exec.

The rationale: I can start a pool of n workers very early in the execution flow. They will have ~350MB memory fingerprint in the beginning and they will be reset to that every ``maxtasksperchild``. So this is basically the amount of VM allocated (doubled) when forking. Pretty small.

Currently, as the fork is done from some process with all the python stack of the app loaded in memory (1.7GB in our case), then some additional 1.7GB of VM are allocated on each fork. This could be avoided if the fork was done from the forkserver pool.

As you mention, we have been considering such a "shell" server on top of asyncio, so your response just confirms our intuition.

I'll close this idea for now since I agree that any investment on this problem should be directed to the asyncio solution.

Please note that the idea proposed would work for Python < 3 (as opposed to anything based on asyncio).
Date User Action Args
2018-12-17 21:12:24oestebansetrecipients: + oesteban, pitrou, 4-launchpad-kalvdans-no-ip-org
2018-12-17 21:12:24oestebansetmessageid: <>
2018-12-17 21:12:24oestebanlinkissue35238 messages
2018-12-17 21:12:23oestebancreate