[IronPython] IronPython memory usage

Dino Viehland dinov at microsoft.com
Fri Dec 10 03:01:49 CET 2010

What task manager reports I believe depends on what version of Windows you're on.  You might want to right click on the columns and add some of the Memory columns.  By default Win7 seems to have private working set selected (which would be what each additional copy requires).  But there's also a "Working Set" option which should be private + shared bytes.

Also, one way to reduce the memory usage would be to pre-compile your app and ngen it if you're not already doing so.  This will cause the Python code (at least the code which isn't eval'd/exec'd/compile'd) to be shared between processes.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ken MacDonald
Sent: Thursday, December 09, 2010 6:50 AM
To: Discussion of IronPython
Subject: [IronPython] IronPython memory usage

We're trying to figure out the usage of overall system memory by our IronPython/WPF app. I've been looking at various "memory profilers", but they seem to be concerned with memory leaks within the app itself, etc.

What we'd like to be able to find out is something like this:

1) How much memory does my app use? This is pretty straightforward, check task manager.

2) How much memory does a second (third, fourth...) copy of the app use? Task manager does not appear to show this correctly.

It seems as if .NET should be shared among different instances of the application, so that if the first instance of an app uses up 600M of system memory (say, 400M of .NET and 200M of application code) then a second, third... instance of the app should only add each an incremental 200M to the total system memory usage. Task manager appears to show each instance as independently using 600M, inflating the apparent memory used.

Anyone know how to properly determine the system load for multiple instances of a .NET app? Again, most of the "memory profilers" don't really appear to address this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20101210/2e0e0e8d/attachment.html>

More information about the Ironpython-users mailing list