IIS dotMemory results - memory leak

Hello.  I'm new to dotMemory, and I'm trying to figure out the meaning of some results. 

I have an IIS website running an ASP.NET application.  For my test, I just keep refreshing a single page within the app.  The page is fairly complex.

Looking at the attached graph, and watching the memory #'s live, it appears that managed memory (Gen2 and Gen1) keeps taking up more and more memory.  Gen0 (more temporary memory) keeps getting garbage collected (GC).  As the Gen2 and Gen1 memory take up more memory, IIS keeps assigning more and more non-managed memory to the process in order to  handle the managed memory.  Eventually, at the 38 minute mark, you see a large GC appear and almost all the Gen2, Gen1, and Gen0 memory are released.  At the same time, you can see that IIS is still holding on to all that memory that was being used for the non-managed memory.  Any ideas/help would be much appreciated as to what could be happening. Thank you!

 

 

0
1 comment

GC is called automatically according to the algorithms during app's execution. For example, GC have to be called if memory resources are insufficient.There are several GC modes, for example GC can be called for the specific generation only. GC strategy is selected automatically based on internal heuristic algorithms.

When you get snapshot in dotMemory, we call full GC from the native code. MS Profiling API injects a .dll (written in c++) into the profiling process, it's a part of dotMemory named Profiling Core which plays the role of the "server" (where standalone dotMemory written in C# is a client). When you click "Get Snapshot", c++ code is triggered in Profiling Core. Thus, the most complete GC is performed after getting a snapshot in dotMemory. Gen2 heap have not been released before snapshot most likely for this reason.

Memory may be remained after GC due to .NET and IIS optimizations. For example, it can be kept as a free memory in the heap or as an unmanaged memory to make future allocations faster. This memory will be released if resources become insufficient.

 

 

0

Please sign in to leave a comment.