views:

30

answers:

1

Hi All,

I have a memory issue on my websites and am trying to get to the bottom of it. I have downloaded the 14 day trial of ANTS Memory Profiler and have been playing with it to get a grip of what it's telling me. In the memory options on the timeline, I can see Bytes in All Heaps and Private Bytes etc but I am not sure which ones I should be focusing on to see where the memory spikes and doesn't go back down.

I am profiling a ASP.NET website using ASP.NET 2.0.

Can someone advise?

+1  A: 

Bytes in all heaps will cover all your .net objects, whilst the private bytes will also cover non-.net objects (so if you use any COM objects, for instance). I'd start by focussing on the managed objects (so bytes in all heaps), before worrying about the overall picture.

Rowland Shaw
I am using a lot of XML files on the website, would this be within the Private Bytes? I ask because I hardly see anything move on the Bytes in All heaps - flat line at the bottom most of the time. The Private Bytes line seems to go up when I do something that queries an XML file.
webnoob
@webnoob that all depends on what code you've used for your XML handling -- it would be possibly to do it with managed code (i.e. .Net) or also via COM objects. With ANTS, you can view the objects that are new in memory between two snapshots, so you should be able to see what objects are using the memory. Be careful not to over-optimise though, the first time an action happens, there might be initial set-up allocations, so focus on consistent leaks on the 2nd, 3rd, 4th etc iterations
Rowland Shaw
Ok, that answers the question. Thanks.
webnoob