Reducing Python's memory footprint?

Joel Hatch joel at wolfpack2000.com
Wed Feb 23 19:58:38 CET 2000


I think that's the problem. How do I get it to share the executable code
between the processes? As a test, I loaded five copies of my application,
and kept track of how much memory was being used (resident size). It looks
like this:

5,988k for the first
11, 976k for two
17,964k for three
23,952k for four
29,940k for five

There doesn't seem to be *any* sharing of resources in this...

--Joel

Niels Diepeveen wrote:

> Joel Hatch schreef:
> > Using five megs to load a Python interpreter is a little excessive, but
> > acceptable. Blowing a half of my available RAM on a handful of nifty
> > panel applets and a monitor or two just doesn't work, though...
>
> If it takes 5MB to run a single process, that doesn't mean you need 50MB
> to run 10 processes. All (or most) of the executable code (the
> interpreter, C modules etc.) is shared between these processes, so
> running 10 of them may take only 6MB or so, depending mostly on the
> amount of memory used to store data.
>
> --
> Niels Diepeveen
> Endea automatisering




More information about the Python-list mailing list