Click to See Complete Forum and Search --> : Monitoring Session memory consumption


THY02K
November 11th, 2005, 12:31 AM
Hey, how do you monitor how much memory is consumed by each session? I tried trace - it tells you what's in session, you need to do the math yourself. I also tried performance monitor - there isn't a suitable counter it seems.

Any idea?

Norman Fung

HanneSThEGreaT
November 11th, 2005, 04:45 AM
Maybe this article (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/dbgch02.asp) might provide you greater insight

THY02K
November 14th, 2005, 10:56 PM
Thanks and sorry took so long to reply, I've printed the article which I will consume over a coffee momentarily. Anyway, did some tests, I am monitoring:

.NET CLR Memory \ # Bytes in All Heaps

According to definition:

This counter indicates the current memory allocated in bytes on the GC Heaps.

It didn't occur to me that this counter is reflecting "Memory held in Session" because I was expecting memory consumption goes up, then stay at that level (which it didn't) until Session is closed (ie. browser is closed). Perhaps I'm monitoring the wrong counter...? Any suggestion?

THY02K
November 14th, 2005, 11:14 PM
Just tried SciTech .NET Memory Profiler (http://www.scitech.se/memprofiler/download.aspx)

I started profiling, for my application I wanted to profile memory held in System.Web.HttpSessionState. Not sure exactly how I should monitor it...

I set selection filter to "System.Web.SessionState" to locate the monitor I need - it says total 64 Bytes allocated in session - which seems far too small then what I expected.

Please refer to attached JPEG's. Am I monitoring the wrong item?

THY02K
November 15th, 2005, 09:07 PM
I read the article you recommended (http://www.codeguru.com/forum/newreply.php?do=newreply&noquote=1&p=1271146) and started monitoring:

a. .NET CLR Memory \ #Bytes in all Heaps
b. .NET CLR Memory \ Large Object Heap Size
c. Process \ Private Bytes

Can't make sense of data I'm getting. I attached the graphs (with specific questions) in a Word document attached (Debugging ASP.NET memory.zip)...

THY02K
November 16th, 2005, 08:44 PM
Almost forgot, there's a discussion forum for Memory Profiler:

http://memprofiler.com/forum/