[Baypiggies] Watching how much memory my Python program is taking up

Paul Hoffman paul.hoffman at gmail.com
Thu Feb 19 17:08:47 CET 2015


Greetings. I have a Python 3.4 program that will keep eating up memory
until I tell it to stop; in short, it uses asyncio to launch as many
coroutines as the machine can handle. I want to determine approximately how
much memory I am using at this moment so I know when to stop consuming more
and having the box run out of memory (I already have swapping turned off).

Are there well-known patterns for this? I looked in a bunch of places and
found nothing, which kinda surprised me. I recognize that it is unlikely
that there is a cross-OS method for this, but I would be happy with just
something that says "I'm now taking up a total of 3.7 gig" and I can do the
"how much is too much" calculation by hand.

Pointers are appreciated.

--Paul Hoffman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20150219/a69fb6cb/attachment.html>


More information about the Baypiggies mailing list