I'm using dotMemory to profile asp.net mvc application running on IIS.
And I suspect that 'get snapshot' causes GC gen2 to run. Why? Here is the picture:
Question is: is it normal behaivour? Why can't I get snapshot showing me all this uncollected by GC stuff? Every time I gets snapshot: memory usage falls down.
Yes, this is the normal behavior, because it does a full garbage collection before getting a snapshot. If you see memory usage falls down when you get a snapshot, that's a good sign.
Garbage collector cleans memory only if there is a memory stress. If you want to check for memory leaks you have to execute a full garbage collection and get a snapshot. If anything remains that's a memory leak.
Generally you should get a clean base snapshot and then another clean snapshot after you executing the functionality you want to test and then compare both snapshots.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With