Ratio of PrivateBytes to # Bytes in all heaps

B

Brian

Is there a rule-of-thumb for a healthy ratio between these two
counters? I think I have some memory leak problems on the run in my
ASP.NET application but the difference between these counters bothers
me. I'm seeing anywhere from 2 to 3:1 ratio. Right now, for example,
private bytes is 95M and total heap is 45MB. Total heap changes more
frequently than private bytes (finally going _down_ too!) but the trend
is for them to stick together.

Also, I assume the difference between these two counters is unmanaged
memory. Is that released when aspnet_wp.exe recycles? I had some
weirdness this morning where an Antivirus run caused it to restart and
the managed counters reset but private bytes didn't go all the way to
0. I don't know if it was a counter anomoly or not.

Anyway, thanks in advance for the tips!

-Brian
 
B

Bruce Barker

the private bytes are released when the asp.net worker process exits. this
happens on an asp.net recycle, but not on an appdomain recycle (what a file
changes triggers). there is no rule of thumb for ratio of private bytes vs
managed heap, it all depends on the application.

your best bet is to run application under load, then pause, run gc serveral
times, and check private bytes. then repeat. if the private bytes is
consistant, then you probably don't have a leak.

you need to monitor your application when its healthy, so you can tell when
its not.

-- bruce (sqlwork.com)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top