[IronPython] Controling DLR/IronPython Memory Size

Dino Viehland dinov at microsoft.com
Mon Aug 17 18:41:10 CEST 2009

What version of IronPython are you using?  Have you ngen'd the binaries?
Ngen will significantly reduce the amount of private working set IronPython

I assume you don't have a "site.py" or the standard library present or I
think it'd probably be more.

On my machine (some post-RC1 Windows 7 build) I see:
        C# Hello World: 1.5MB Private working set
        "ipy.exe -S" (IronPython 2.6B2, ngen'd binaries): 4.7MB private working set

Giving us about 3.2MB to start up IronPython including its REPL.

2.6 certainly is better from a working set perspective than 2.0 is but the
gains there are mainly for large applications.

2.6 should also see better WS on non-Vista platforms.  This is because
we've fixed the base addresses up to make sure that ngen'd binaries don't
require being re-based when they get loaded.

We haven't really focused on memory usage of hello world at all.  But we'd
welcome a bug on CodePlex to draw our attention to the problem.

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Boris Aronshtam
> Sent: Sunday, August 16, 2009 3:31 PM
> To: 'Discussion of IronPython'
> Subject: [IronPython] Controling DLR/IronPython Memory Size
> I am developing a C# app and considering to embed IronPython scripting.
> Using TaskManager, I have noticed that
> - the minimal C# ConsoleApp that includes DLR and IronPython is 8.7MB
> in RAM
> - while the minimal C# ConsoleApp that does not include DLR and
> IronPython
> is only 1.5MB in RAM
> Unfortunately extra 7MB in RAM is too much to justify scripting. Is
> there
> any idea what this 7MB is used for? And more importantly, does anyone
> know
> how to reduce the RAM size?
> Thanks!
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

More information about the Ironpython-users mailing list