locked
Measuring Application Pool Memory? RRS feed

  • Question

  • User-1145838388 posted

    Hi all

    I am currently developing an ASP.NET web site www.fishwisepro.com which is hosted by Arvixe. If I choose "Dedicated Application Pool" then I run out of memory and the site gives me error messages, usually "Invalid Viewstate". The type of account I am using has an Application Pool of 250MB. I plan to upgrade to an account with a 500MB limit instead. AFAIK, their hosting system uses IIS7.5

    My question is this: how can I measure how much RAM is being used up in the Application Pool?

    I'm sure I could make my pages use less memory, but how can I tell what is working and what isn't? My development environment is VS2010 and I am using IIS7.5 Express on my Win7 development machine.

    Any or all suggestions, RTFMs (just tell me which manual) etc would be greatly appreciated.

    Wednesday, August 24, 2011 6:29 AM

Answers

  • User-949955009 posted

    If you are looking to only display the memory allocated for the current process you could use:

    Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
    long totalBytesOfMemoryUsed = currentProcess.WorkingSet64;
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 24, 2011 9:30 AM

All replies

  • User-949955009 posted

    hi Donn,

    Have a look at the following post : http://msdn.microsoft.com/en-us/library/ff647791.aspx 

    I think you should consider profiling your application to determine how much memory it's being allocated and how your application is responding to the various requests.

    You can either use the profiling tools in Visual Studio 2010 Ultimate Edition or you can go for third party tools such as JustTrace, ANTS Profilers etc.

    Wednesday, August 24, 2011 6:50 AM
  • User-1145838388 posted

    For some reason all the text went misssing in my post:

    >>>

    lI am currently developing an ASP.NET web site www.fishwisepro.com which is hosted by Arvixe. If I choose "Dedicated Application Pool" then I run out of memory and the site gives me error messages, usually "Invalid Viewstate". The type of account I am using has an Application Pool of 250MB. I plan to upgrade to an account with a 500MB limit instead. AFAIK, their hosting system uses IIS7.5

    My question is this: how can I measure how much RAM is being used up in the Application Pool?

    I'm sure I could make my pages use less memory, but how can I tell what is working and what isn't? My development environment is VS2010 and I am using IIS7.5 Express on my development machine.

    Any or all suggestions, RTFMs (just tell me which manual) etc would be greatly appreciated.<\
    
    
    <<<
    I will definitely try the techniques mentioned by gsaadeh.
    I was hoping there was an ASP.NET value like 
    Application.Pool.MemoryUsed
    that I could display at the bottom of a page or something. 
    Wednesday, August 24, 2011 8:50 AM
  • User-949955009 posted

    If you are looking to only display the memory allocated for the current process you could use:

    Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
    long totalBytesOfMemoryUsed = currentProcess.WorkingSet64;
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 24, 2011 9:30 AM