On a production environment, how can one discover which Asp.Net http requests, whether aspx or asmx or custom, are causing the most memory pressure within a w3wp.exe process? I don't mean memory leaks here. It's a good healthy application that disposes all it's objects nicely. Microsoft's generational GC does it's work fine. Some requests however, cause the w3wp process to grow its memory footprint considerably, but only for the duration of the request.

From a sysadmin's point of view on scalabity and cost efficiency of a .Net based SAAS application, I think that my question is a perfectly legitimate one. It would fit in this series of similar questions:

  • which non-cached page reponses are cacheable?
  • which pages consume the most cpu?
  • which pages casues the most database load?
  • which pages take the longest to serve?
  • which pages consume the most worker process memory?

Some of these are easily answered, i.e. the IIS log (with logparser) gives a quick answer to which take the longest time. And there are plenty of tools that can analyze the cacheablity.

I want to regularly report back to the development department on their most memory hogging aspx/ascx/asmx pages, in order to return that (memory) pressure where it belongs, so to speak.

There doesn't seem to be anything like:

HttpContext.Request.PeakPrivateBytes or .CurrentPrivateBytes or Session.PeakPrivateBytes

A penny for your 2 cents...

  • i've never heard of such a feature; but i'd certainly be interested in knowing of one. – Ian Boyd Oct 30 '09 at 17:25

See the excellent MSDN blog series regarding high memory usage debugging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.