analyzing gc collections

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Posts: 1
Joined: Wed Aug 09, 2006 3:09 pm

analyzing gc collections

Post by JamesC » Wed Aug 09, 2006 3:13 pm

hi, i'm currently evaluating your product for use at my company. i've found that during a long running process to create our data structures we cause many gen 2 gc collections and that adversely affects performance. i can see these collections occurring on the real time allocation graph. i had thought to figure out why these collection occur by looking for a list of instance collected (possibly with instance data information), then looking at our source to see why these objects are gen 2. is there a way to do this with the mem profiler? is there a better way to find the cause of issues like this? thanks!

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

Post by Andreas Suurkuusk » Wed Aug 09, 2006 9:26 pm

Have your tried to enable the heap utilization tracker (using the Tools->Settings dialog)? The heap utilization tracker provides you with information about the generation of all allocated instances.

After enabling the heap utilization tracker select "Heap utilization" in the field set list. In the "Classes" view you will now see information about the generations of all instance allocations. For optimal heap utilization most allocated instances should be collected in gen #0, which is probably not the case for your program. Using the classes view, you can locate classes with a large number of instances in gen #2. By viewing the class details of these classes, you will be able to see the call stacks of the instance allocations that end up in gen #2. Or you can use the "Call stacks/Methods" to get information about call stacks or methods that create a lot of instances that gets promoted to higher generations.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests