[Mono-dev] Memory usage differences between GC and OS

pablosantosluac at terra.es pablosantosluac at terra.es
Tue Oct 12 12:22:32 EDT 2010


Hi Andreas,

> As you wrote: That 200Mb isn't memory! It is address space.
> And as you have about 17592186044416 Mb of address space available on a
> 64-bit system 200MB isn't much to worry about.

Yep, ok, there's a longer story behind: we worked close to the Mono team
figuring out several issues in Boehm in the past, specially detecting
situations where the lousy way to detect objects it uses is able to mess
up the whole thing in seconds and doing something as easy as introducing
a long in the stack (passing it as a parameter) ends up with your app
"eating" 1GB of RAM in a second. Fortunately it is not so dramatic with
64bits systems.

The thing is: yes, I wouldn't care about VIRT that much but since Boehm
doesn't do a very decent work, at the end your real mem keeps growing
because GC thinks there's no free mem and so on... Which ends up being a
problem.

When I start up the process I was talking about, and run a few test
iterations, it only needs like 70-80Mb, so I guess all the assemblies
are already memmapped here, problem is, as I mention, that it keeps
growing, and growing, and growing. And no, it's not due to assembly
loading. And it doesn't grow with .NET GC either (on Windows), not at
least at the same pace.

So, yes, it's not about being concerned by a few Mb here or there, it's
about being able to keep real systems running understanding what the
memory is being spent on, when GC tells you it's using 1GB but VIRT
points to 3Gb and RES to 1.8Gb... These are basically the situations I'm
concerned about, the 200Mb ones was just a simple example.

Thanks,

pablo


More information about the Mono-devel-list mailing list