Why number of sub processes in python influence the memory consumption of the sub processes?
<p>I have a very interesting case in python.</p>

<p>The main process creates N sub-processes.
The subprocesses are classes that inherit from <strong>multiprocessing.Process</strong>.</p>

<p>Now, when the number of the sub processes is 10, each one of the sub processes consumes about 15M of residential memory.
However, when I increase the number of the sub processes to 100, the residential memory consumption of each one of the sub processes jumps to about 50M!!!</p>

<p>Anybody can explain this jump in memory / suggest how to avoid it?</p>

<p>Here is the structure of the sub-process class:</p>

<pre><code>class MySubProcess(multiprocessing.Process):
    def __init__(self, sub_process_number):
        multiprocessing.Process.__init__(self, target=self.go)

        self.m_sub_process_number = sub_process_number


    def go(self):
        self.m_config = global_config
        while (True):
        ....
</code></pre>

<p>Thanks a lot!!!</p>
