python memory usage
Ivan Voras
ivoras at __geri.cc.fer.hr
Mon Feb 16 16:35:32 EST 2004
Peter Maas wrote:
> But python (contrary to perl) starts an interactive interpreter which
> doesn't matter when executing scripts. To get rid of it I created
> a fifo (mknod xxx p) and started all programs with 'prog xxx'.
Why didn't you just make a python script that does nothing (maybe
something like "while 1: pass")?
> The result:
>
> CMD RSS VSZ
> perl 892 2736
> python 544 2424
> tclsh8.3 1100 2316
>
> The fifo keeps Python in working memory but since the input isn't
> a tty, the interactive interpreter isnt't started. Is this a
> reasonable comparison or did I miss something?
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
More information about the Python-list
mailing list