I want to check the memory leakage issue in my service. I have tried following set of perfmon counters.
- .NET CLR Memory\# Bytes in all Heaps
- .NET CLR Memory\Gen 2 Heap Size
- .NET CLR Memory\# GC handles
- .NET CLR Memory\# of Pinned Objects
- .NET CLR Memory\# total committed Bytes
- .NET CLR Memory\# total reserved Bytes
- .NET CLR Memory\Large Object Heap size
I have referred above set from here
Also referred following set:
- Memory/Available Bytes
- Memory/Committed Bytes
- Process/Private Bytes
- Process/Page File Bytes
- Process/Handle Count
I have referred above set from here
Is there any parameter/criteria or any other best way to identify perfmon counter for memory leak?
Can any one suggest me set of counters to check memory leak? Or above sets covers memory leak?
There are better tools available to make memory leaks testing easier such as RedGate ANTS Memory Profiler and JetBrains dotMemory Profiler.
However if you want to use Performance counters, this article explains how to use Performance Counters to test memory leaks.
Keep in mind that Garbage Collection doesn't release memory immediately after some instance dispose. It has been optimized to trigger and release memory only when there is a memory stress. So, if you want to test for memory leaks you should execute Garbage Collection manually before you take counter readings.
To detect a memory leak using Performance Monitor, monitor these counters:
Source
In my experience this is accurate.
I'd also refer you to this Microsoft Advanced Debugging blog by Tess, a Microsoft employee. Who suggests the following counters. I have found the above to be more than enough to indicate a memory leak is present but I trust that Tess's instructions could provide a more indepth insight into the issue.
Debugging Demos - Memory Review