开发者

How can I accurately determine application pool memory usage by an ASP.NET application

开发者 https://www.devze.com 2023-02-11 21:54 出处:网络
My hosting company imposes a 100mb memory limit on application pools (IIS 7.5). How can I accurately determine the memory usage of my ASP.NET application?

My hosting company imposes a 100mb memory limit on application pools (IIS 7.5).

How can I accurately determine the memory usage of my ASP.NET application?

In order to create some kind of base line I created an empty ASP.NET MVC 3 application with a single controller action, returning a string result.

Profiling this application with ANTS had the following results:

Generation 1 - 286.2KB
Generation 2 - 795.4KB
Large Object Heap - 75.63KB
Unused memory allocated to .NET - 1.323MB
Unmanaged - 26.78MB

My concern is that if the application pool restrictions is based on private bytes, then a blank ASP.NET MVC application is using 33MB of the pool's resource. Therefore my MVC application that actually does something (using 93MB) will easily go over the "limit".

If however, I call GC.GetTotalMemory then the result is 8MB, which sounds much more acceptable.

I've had absolutely no success in finding any benchmarks to test against, but if an empty MVC web application does indeed use 33MB of resource (this does so开发者_高级运维und excessive) then the restrictions that my host imposes seem completely unrealistic.

Many thanks, Ben


  1. Chat with your hosting provider to see whether that memory limit is for private memory or virtual limit.
  2. Learn about private memory and virtual memory, and then make use of ANTS profiler to better understand your application's memory foot print.
0

精彩评论

暂无评论...
验证码 换一张
取 消