multiprocessing / forking memory usage
Aahz
aahz at pythoncraft.com
Sat May 30 17:22:57 EDT 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/
my-python-code-runs-5x-faster-this-month-thanks-to-dumping-$2K-
on-a-new-machine-ly y'rs - tim
More information about the Python-list
mailing list