Python & memory usage

Florian Schulze florian.proff.schulze at gmx.net
Mon Aug 25 19:27:07 CEST 2003


On 24 Aug 2003 17:33:45 -0700, lebo <leonardbocock at yahoo.com> wrote:

> I'm experimenting with using Python as a very low resource usage
> systems management agent. Currently the best I'm getting is about a
> 2.4MByte base usage (python interp only) and with application,
> 4.8MByte memory footprint on WinXP.  This is probably too high for sme
> target systems - ideally under 3MByte memory usage is a good target
> for a simple, quiesent stub agent - dynamic loading/unloading of
> classes on top of this is ok.
> Some general questions....
> 1) Are there ways to reduce the memory footprint of Python to make it
> really lean?
> 2) Compile options?
> 3) Other options?
>
> Any thoughts appreciated.
> L
>

You should measure the memory footprint on the target, not on WinXP. You 
can leave out builtin modules if you don't need them, this might give you 
some more memory, but most modules aren't that big.

Florian




More information about the Python-list mailing list