Observing memory usage for python programs

Several times already, I wish I could observe the memory usage of some python scripts/modules, and more importantly, which portion is consumed in which objects. For C/python problems, I’ve used massif from valgrind, but this is not alway usable. On the bzr ML, several alternatives have been suggested:

  1. reducing-the-footprint-of-python-applications
  2. Heapy
  3. Another solution which requires recompiling the python interpreter: see here. Unfortunately, numpy does not work with an interpreter compiled with this (at least on linux).

Will try those methods when I will have some more time, and report a bit in more details

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

November 2007
M T W T F S S
    Dec »
 1234
567891011
12131415161718
19202122232425
2627282930  

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 10 other followers

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: