Measuring Cache object sizes in ASP.NET 2.0

  • Thread starter Thread starter chris
  • Start date Start date
C

chris

I have an ASP.NET web application with some memory issues. I am
trying to quantify the amount of memory being used by the
application's Cache. I would also like to see the size of individual
Cached objects. I have searched the web and have come up empty on the
subject. It seems especially difficult in 2.0 because of the new
caching enhancements to serialization of types and objects, but I
could be wrong.

I am interested in knowing:
1. A way to monitor a web applications total Cached bytes in like
Perfmon.
2. A way to see the byte size of specific cached objects in an
accurate manner.

Thank you in advance,
Chris
 
for number one, use the perfmon counters (can be called from code via
the registery calls).

for number two, there is no great solution. the most common is to binary
serialize the cache objects and add up the buffer sizes. this is only an
esitmate.

if you really need to know, then see the sos.dll addin for the win32
debugger.

-- bruce (sqlwork.com)
 
Back
Top