multiprocessing / forking memory usage
aahz at pythoncraft.com
Sat May 30 23:22:57 CEST 2009
In article <mailman.771.1243360355.8015.python-list at python.org>,
Randall Smith <randall at tnr.cc> wrote:
>I'm trying to get a grasp on how memory usage is affected when forking
>as the multiprocessing module does. I've got a program with a parent
>process using wx and other memory intensive modules. It spawns child
>processes (by forking) that should be very lean (no wx required, etc).
>Based on inspection using "ps v" and psutil, the memory usage (rss) is
>much higher than I would expect for the subprocess.
One option if you're concerned about memory usage is to os.exec() another
program after forking, which will overlay the current process.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
on-a-new-machine-ly y'rs - tim
More information about the Python-list