Objects created in a operation
-
- Posts: 3
- Joined: Mon Apr 18, 2016 12:20 pm
Objects created in a operation
Hi,
I am investigating the memory consumption of my application with .NET Memory Profiler.
I have a background operation which is doing some actions. When this operation is active I can see in the Real-time view, that the Garbage collection is invoked frequently, however I can not see the objects which are using more memory because they are released, so I can not take snapshot with valid information.
Is it possible to see the most memory consuming created objects in a background operation which is repeated once and again? How?
Best Regards.
I am investigating the memory consumption of my application with .NET Memory Profiler.
I have a background operation which is doing some actions. When this operation is active I can see in the Real-time view, that the Garbage collection is invoked frequently, however I can not see the objects which are using more memory because they are released, so I can not take snapshot with valid information.
Is it possible to see the most memory consuming created objects in a background operation which is repeated once and again? How?
Best Regards.
-
- Posts: 1030
- Joined: Wed Mar 02, 2005 7:53 pm
Re: Objects created in a operation
When collecting a snapshot you cannot get instance specific information about released instances, but you can get detailed information about the allocations performed for each type. If you collect two snapshots, you will get information about the allocations performed for each type between the snapshots.
You can then double-click one of the types to get more details information about the allocations of a type. Show the allocation call stacks and sort them by "Allocations/sec". Now you will get call stack information about all the allocations of the type. You can browse through the allocation stacks using the navigation buttons.
The "Call stacks/Methods" page can also be used to retrieve allocation information, focusing on the methods/call stacks instead of types.Best regards,
Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
SciTech Software AB
-
- Posts: 3
- Joined: Mon Apr 18, 2016 12:20 pm
Re: Objects created in a operation
Thank you for you answer, I was deeping in that way.
Only one question more.
In real time tab, we see some information of current live instances, allocs/sec, ...
Here, there are points marked in gray where according the legend the garbage collector is triggered. In this information, what the number on the top of the lines means? And is this information reliable? Because, now I am comparing with the memory profiler from VS2015, and according this one, the garbage collector is not executed the same times.
Best Regards.
Only one question more.
In real time tab, we see some information of current live instances, allocs/sec, ...
Here, there are points marked in gray where according the legend the garbage collector is triggered. In this information, what the number on the top of the lines means? And is this information reliable? Because, now I am comparing with the memory profiler from VS2015, and according this one, the garbage collector is not executed the same times.
Best Regards.
-
- Posts: 1030
- Joined: Wed Mar 02, 2005 7:53 pm
Re: Objects created in a operation
The number in the top of the line indicates the generation of the collection (i.e. gen 0, 1, 2). The GC information should definitely be reliable. How and when the runtime triggers a GC may be affected by the fact that the process is running under a profiler, but the markers are placed at the time of an actual GC. How does it differ from VS2015?
Best regards,
Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
SciTech Software AB
-
- Posts: 3
- Joined: Mon Apr 18, 2016 12:20 pm
Re: Objects created in a operation
Hi,
thanks for you answer.
Visual Studio 2015, executing the same application, shows GC invoctation each minute aprox. On the other hand .NET Memory Profiler each 2 seconds.
I rely .NET Memory Profiler information, but I was surprised about the difference.
Best Regards.
thanks for you answer.
Visual Studio 2015, executing the same application, shows GC invoctation each minute aprox. On the other hand .NET Memory Profiler each 2 seconds.
I rely .NET Memory Profiler information, but I was surprised about the difference.
Best Regards.
Re: Objects created in a operation
Andreas Suurkuusk wrote:When collecting a snapshot you cannot get instance specific information about released instances, but you can get detailed information about the allocations performed for each type. If you collect two snapshots, you will get information about the allocations performed for each type between the snapshots.You can then double-click one of the types to get more details information about the allocations of a type. Show the allocation call stacks and sort them by "Allocations/sec". Now you will get call stack information about all the allocations of the type. You can browse through the allocation stacks using the navigation buttons. The "Call stacks/Methods" page can also be used to retrieve allocation information, focusing on the methods/call stacks instead of types.
detailed one! thanks for the info. I was about to ask or post but when I read this one.. I am moved.. thanks! this is a way better than my optional solution.
Who is online
Users browsing this forum: No registered users and 13 guests