Home All Groups Group Topic Archive Search About

ASP.NET Cache and memory

Author
11 Sep 2006 11:40 AM
SCG
Hi,

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.

Author
11 Sep 2006 12:18 PM
Brennan Stehling
You can set the Cache Priority to NotRemove.  Then it will only be
removed when the time expires and not just because of a memory issue.

It is strange that you would start having this problem.  Can you tell
if there is somehow more data being loaded that was not before?  Have
your tables grown a lot in the few few months?

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

SCG wrote:
Show quoteHide quote
> Hi,
>
> 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.
Are all your drivers up to date? click for free checkup

Author
11 Sep 2006 12:43 PM
SCG
Hi, no we are talking about 200 bytes of data. That's been static all the
time.

I had not realised that NotRemove will still allow the cached data to be
blown away at expiry - that sounds useful, especially since we are talking
about pinning 200 bytes - not 100Kb.

Many thanks.


Show quoteHide quote
"Brennan Stehling" <offwh***@gmail.com> wrote in message
news:1157977081.998486.262700@p79g2000cwp.googlegroups.com...
> You can set the Cache Priority to NotRemove.  Then it will only be
> removed when the time expires and not just because of a memory issue.
>
> It is strange that you would start having this problem.  Can you tell
> if there is somehow more data being loaded that was not before?  Have
> your tables grown a lot in the few few months?
>
> Brennan Stehling
> http://brennan.offwhite.net/blog/
>
> SCG wrote:
>> Hi,
>>
>> 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.
>

Bookmark and Share