Web Application Memory

Hi,

I'm trying to solve a memory problem with my web application. The symptom is that over time, the memory of the aspnet_wp.exe process grows to around 600,000 - 800,000 KB. It usually happens after about 2 hours of use by less than 10 users in an intranet environment.

I'm trying to figure out how all this memory is used. When I profile the application, I take a snapshot and in the summary page I see much less memory than the total aspnet_wp.exe process.

See screenshot: http://uasystems.net/temp/aspnetmemory1.gif
The total aspnet_wp.exe process is over 314,000 KB while the application profiled is only 11,554,299 bytes which is 11,283 KB. So where is all the remaining 300,000 KB?

Thanks for the help, any suggestions are welcome.

Uria

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Uria,

    This is a fairly common question. There are two different forces at work here: the managed memory usage reported by ANTS Profiler and the total memory reported by Task Manager, which includes the application image of the ASPNET_WP.exe and associated resources, the .NET runtime, and other unmanaged code loaded into the process such as COM dlls.

    To get an accurate picture of the managed memory usage, you may use perfmon.exe. There are a number of counters in the .NET CLR Memory performance object such as managed heap size, and if the application is currently running you can even limit perfmon's collections to that particular application.

    If the memory usage is not occurring in the managed area, then ANTS Profiler wouldn't help find the cause. It would only help if the growth is occurring in the managed heap. You may think about some other tool like Process Explorer to see what dlls and other resources are being loaded into the application.

    On the other hand, problems in the managed code area could cause numerous unmanaged objects to load, because sometimes .NET objects are just wrappers around traditional COM objects.

    You may find some of the papers and examples on the website a help in figuring out where the leakage is occurring, if you haven't looked them already:

    http://www.red-gate.com/products/ants_p ... /index.htm
Sign In or Register to comment.