python memory usage

Peter Maas fpetermaas at netscape.net
Tue Feb 17 06:14:02 EST 2004


Ivan Voras wrote:

> Why didn't you just make a python script that does nothing (maybe 
> something like "while 1: pass")?

Fifo was simpler than writing three scripts for tcl, perl and python.
And I wanted a clean comparison with Perl waiting for data from stdin,
a zero test case.

> It cold be ok, but the second rss number seems a bit low. Here (Python 
> 2.3, FreeBSD 4.9) it looks like this:
> 
> tty-interpreter mode:                      rss: 2684, vsz: 3460
> running the one-lined empty loop script:   rss: 2212, vsz: 2992
> "running" an disconnected fifo:            rss: 1296, vsz: 1992

Similar results on my machine:

python   one-lined empty loop  rss: 2148  vsz: 3608
perl     one-lined empty loop  rss: 1112  vsz: 2756
tclsh8.3 one-lined empty loop  rss: 1096  vsz: 2316

Strange that starting an empty loop makes such a difference for python.
Anyway, the numbers are in a reasonable range, unlike the 18 MB than
came up in a discussion. Thanks for comparing.

Mit freundlichen Gruessen,

Peter Maas

-- 
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------



More information about the Python-list mailing list