Out of memory trying to take snapshot

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
nickwwest
Posts: 1
Joined: Mon Jul 23, 2012 8:02 pm

Out of memory trying to take snapshot

Post by nickwwest » Mon Jul 23, 2012 8:13 pm

I'm trying to take a snapshot of a ~6GB .NET process with 4_5_173 but eventually while taking a snapshot of memory .NET Memory Profiler reports an OOM exception. The machine I'm doing my memory profiling on has 42GB of RAM, running .NET 4.5 with large object support via gcAllowVeryLargeObjects. How much memory do I need to get this to complete? This set is already a large cut down of the original, if I go any further it might not be representative of the real problem.


The exact error is

The operation failed with the following error:
Too large instance heap snapshot stream.

This is running through the stand alone app, all set to low

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: Out of memory trying to take snapshot

Post by Andreas Suurkuusk » Wed Jul 25, 2012 7:02 am

When collecting a snapshot, infomation about each instance and all references are stored in an "instance heap", this heap is limited to 4GB and the error message you received indicates that you have reached this limit. We have considered removing this limitation, but removing it has been a low-priority feature, since working with 4GB instance information (mainly references) can cause the profiler to run very slow. Still, this is something we will hopefully implement in the next version of the profiler (v4.6?).

There's also a possibility that the error is caused by the fact that you have enabled the "gcAllowVeryLargeObjects" setting. Instances with a size > 2GB is currently not supported by .NET Memory Profiler, but this is something we're currently working on. Support for very large objects will be included in a maintenance release of v4.5.
Best regards,

Andreas Suurkuusk
SciTech Software AB

kleinux
Posts: 1
Joined: Wed Oct 02, 2013 5:54 pm

Re: Out of memory trying to take snapshot

Post by kleinux » Wed Oct 02, 2013 6:00 pm

Is there any plan to get rid of this limit? I've just been bitten by this as I spent several hours opening a memory dump to have this happen at the very end.

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: Out of memory trying to take snapshot

Post by Andreas Suurkuusk » Thu Oct 03, 2013 12:48 pm

Yes, if you are referring to the error "Too large instance heap snapshot stream.", then there is a plan to support larger than 4 GB instance information in the next version.

We have been looking into supporting this even when running within Visual Studio, but I believe the performance overhead (and implementation effort) of supporting > 4 GB of data in a 32-bit process will be too high. So, this support will only be available in the standalone profiler, when running on a 64-bit OS.

The "gcAllowVeryLargeObjects" option is already supported in version 4.6.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests