ASP.NET and cache - just want to be sure

Discussion in 'ASP .Net' started by SCG, Sep 11, 2006.

  1. SCG

    SCG Guest

    Hi,

    [sorry if this sounds familiar but just want ot be sure]

    I have had a site running for 6 months now. This morning I started observing
    the following behaviour pretty much out of the blue:

    I load a blob of XML into the ASP.NET cache with a timeout of 15 mins, and a
    callback set up to log the unload of the data.

    Immediately (the same second), my callback gets driven with a reason code of
    "Underused", which implies that ASP.NET is feeling memory-challenged.

    But, Task Manager suggests that only 800Mb is being used out of 1Gb, and
    nothing else (SQl Server etc.) seems to have reserved the extra 200Mb
    memory.

    Why is ASP.NET immediately throwing out my newly cached 200 bytes of data?

    Is there any other setting I could be tweaking / monitoring to help tell me
    why?

    Thanks for any help.
    SCG, Sep 11, 2006
    #1
    1. Advertising

  2. 80% of your total memory is a lot. By default, asp.net tries to limits
    itself to 60% of the total available memory. I doubt that you'd want it to
    go anymore than 80%...the O/S still needs to run, and the last thing you
    want is any high amount of paging to the hdd.

    You can specify a priority for your cache, but .NET generally knows better
    how to manage memory than you do.

    You can load up perfmon and look at some performance monitors, cache hits,
    memory size.

    You can get a memory profile and try to use up less than 800megs
    (http://www.red-gate.com/products/ants_profiler/index.htm)

    You can play with your machine.config's processModel section and increase
    the maximum memory limit

    Karl

    --
    http://www.openmymind.net/
    http://www.codebetter.com/


    "SCG" <> wrote in message
    news:ei$...
    > Hi,
    >
    > [sorry if this sounds familiar but just want ot be sure]
    >
    > I have had a site running for 6 months now. This morning I started
    > observing
    > the following behaviour pretty much out of the blue:
    >
    > I load a blob of XML into the ASP.NET cache with a timeout of 15 mins, and
    > a
    > callback set up to log the unload of the data.
    >
    > Immediately (the same second), my callback gets driven with a reason code
    > of
    > "Underused", which implies that ASP.NET is feeling memory-challenged.
    >
    > But, Task Manager suggests that only 800Mb is being used out of 1Gb, and
    > nothing else (SQl Server etc.) seems to have reserved the extra 200Mb
    > memory.
    >
    > Why is ASP.NET immediately throwing out my newly cached 200 bytes of data?
    >
    > Is there any other setting I could be tweaking / monitoring to help tell
    > me
    > why?
    >
    > Thanks for any help.
    >
    >
    Karl Seguin [MVP], Sep 11, 2006
    #2
    1. Advertising

  3. Also check the settings for your Application Pool. Maybe it is not
    giving you access to all of that memory.

    Brennan Stehling
    http://brennan.offwhite.net/blog/

    SCG wrote:
    > Hi,
    >
    > [sorry if this sounds familiar but just want ot be sure]
    >
    > I have had a site running for 6 months now. This morning I started observing
    > the following behaviour pretty much out of the blue:
    >
    > I load a blob of XML into the ASP.NET cache with a timeout of 15 mins, and a
    > callback set up to log the unload of the data.
    >
    > Immediately (the same second), my callback gets driven with a reason code of
    > "Underused", which implies that ASP.NET is feeling memory-challenged.
    >
    > But, Task Manager suggests that only 800Mb is being used out of 1Gb, and
    > nothing else (SQl Server etc.) seems to have reserved the extra 200Mb
    > memory.
    >
    > Why is ASP.NET immediately throwing out my newly cached 200 bytes of data?
    >
    > Is there any other setting I could be tweaking / monitoring to help tell me
    > why?
    >
    > Thanks for any help.
    Brennan Stehling, Sep 11, 2006
    #3
  4. SCG

    SCG Guest

    Sorry - I meant that Task Manager was showing me the *total* used memory -
    not just for those processes using .NET.

    So, I figured 800Mb was OK. What I could not / still cant understand is why
    it's simply not using that 200Mb spare, and instead dumping my 200 bytes out
    of cache with "Underused"...

    ....as though it can;t get to that last 200Mb (even though it's not been
    reserved for SQLServer 2000 or such).

    Thanks,
    Simon.


    "Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
    net> wrote in message news:%...
    > 80% of your total memory is a lot. By default, asp.net tries to limits
    > itself to 60% of the total available memory. I doubt that you'd want it to
    > go anymore than 80%...the O/S still needs to run, and the last thing you
    > want is any high amount of paging to the hdd.
    >
    > You can specify a priority for your cache, but .NET generally knows better
    > how to manage memory than you do.
    >
    > You can load up perfmon and look at some performance monitors, cache hits,
    > memory size.
    >
    > You can get a memory profile and try to use up less than 800megs
    > (http://www.red-gate.com/products/ants_profiler/index.htm)
    >
    > You can play with your machine.config's processModel section and increase
    > the maximum memory limit
    >
    > Karl
    >
    > --
    > http://www.openmymind.net/
    > http://www.codebetter.com/
    >
    >
    > "SCG" <> wrote in message
    > news:ei$...
    >> Hi,
    >>
    >> [sorry if this sounds familiar but just want ot be sure]
    >>
    >> I have had a site running for 6 months now. This morning I started
    >> observing
    >> the following behaviour pretty much out of the blue:
    >>
    >> I load a blob of XML into the ASP.NET cache with a timeout of 15 mins,
    >> and a
    >> callback set up to log the unload of the data.
    >>
    >> Immediately (the same second), my callback gets driven with a reason code
    >> of
    >> "Underused", which implies that ASP.NET is feeling memory-challenged.
    >>
    >> But, Task Manager suggests that only 800Mb is being used out of 1Gb, and
    >> nothing else (SQl Server etc.) seems to have reserved the extra 200Mb
    >> memory.
    >>
    >> Why is ASP.NET immediately throwing out my newly cached 200 bytes of
    >> data?
    >>
    >> Is there any other setting I could be tweaking / monitoring to help tell
    >> me
    >> why?
    >>
    >> Thanks for any help.
    >>
    >>

    >
    >
    SCG, Sep 11, 2006
    #4
  5. I do not believe the way the Cache works is documented. I have not
    seen it anywhere. What would be useful is a metric on the total memory
    held in the Cache. I am not aware of how that can be done without a
    profiler.

    Brennan Stehling
    http://brennan.offwhite.net/blog/



    SCG wrote:
    > Sorry - I meant that Task Manager was showing me the *total* used memory -
    > not just for those processes using .NET.
    >
    > So, I figured 800Mb was OK. What I could not / still cant understand is why
    > it's simply not using that 200Mb spare, and instead dumping my 200 bytes out
    > of cache with "Underused"...
    >
    > ...as though it can;t get to that last 200Mb (even though it's not been
    > reserved for SQLServer 2000 or such).
    >
    > Thanks,
    > Simon.
    >
    >
    > "Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
    > net> wrote in message news:%...
    > > 80% of your total memory is a lot. By default, asp.net tries to limits
    > > itself to 60% of the total available memory. I doubt that you'd want it to
    > > go anymore than 80%...the O/S still needs to run, and the last thing you
    > > want is any high amount of paging to the hdd.
    > >
    > > You can specify a priority for your cache, but .NET generally knows better
    > > how to manage memory than you do.
    > >
    > > You can load up perfmon and look at some performance monitors, cache hits,
    > > memory size.
    > >
    > > You can get a memory profile and try to use up less than 800megs
    > > (http://www.red-gate.com/products/ants_profiler/index.htm)
    > >
    > > You can play with your machine.config's processModel section and increase
    > > the maximum memory limit
    > >
    > > Karl
    > >
    > > --
    > > http://www.openmymind.net/
    > > http://www.codebetter.com/
    > >
    > >
    > > "SCG" <> wrote in message
    > > news:ei$...
    > >> Hi,
    > >>
    > >> [sorry if this sounds familiar but just want ot be sure]
    > >>
    > >> I have had a site running for 6 months now. This morning I started
    > >> observing
    > >> the following behaviour pretty much out of the blue:
    > >>
    > >> I load a blob of XML into the ASP.NET cache with a timeout of 15 mins,
    > >> and a
    > >> callback set up to log the unload of the data.
    > >>
    > >> Immediately (the same second), my callback gets driven with a reason code
    > >> of
    > >> "Underused", which implies that ASP.NET is feeling memory-challenged.
    > >>
    > >> But, Task Manager suggests that only 800Mb is being used out of 1Gb, and
    > >> nothing else (SQl Server etc.) seems to have reserved the extra 200Mb
    > >> memory.
    > >>
    > >> Why is ASP.NET immediately throwing out my newly cached 200 bytes of
    > >> data?
    > >>
    > >> Is there any other setting I could be tweaking / monitoring to help tell
    > >> me
    > >> why?
    > >>
    > >> Thanks for any help.
    > >>
    > >>

    > >
    > >
    Brennan Stehling, Sep 12, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rein Petersen
    Replies:
    1
    Views:
    397
    Matt Anderson
    Jul 6, 2003
  2. Replies:
    0
    Views:
    551
  3. Noah Roberts

    Just want to make sure...

    Noah Roberts, Apr 28, 2009, in forum: C++
    Replies:
    10
    Views:
    511
    James Kanze
    May 1, 2009
  4. kevin
    Replies:
    1
    Views:
    372
    Kairi Zikpin
    Jul 21, 2006
  5. Terry
    Replies:
    1
    Views:
    94
Loading...

Share This Page