Options

Memory Usage on ASP.net wrong?

Hi,

When I memory profile my ASP.net v1 application. The total size of all live objects property reads 1,265,874 bytes.

However, the W3WP process reads anywhere from 40mb to 100mb for just one application??

Is this correct?

John

Comments

  • Options
    Hi John,

    The total size of all live objects only refers to the managed heap - i.e. the memory managed by the .NET runtime. It doesn't include any unmanaged / native memory, which probably makes up a considerable amount of the footprint of the worker process you're referring to.

    You might want to take a look at how the memory is allocated using Dan Archer's Memory Tracker tool, found on the Red Gate Labs site. This will show you how much is allocated to the managed heap, and where the rest of it is going.

    Please note that Memory Tracker isn't a supported product, but it might help you.

    Hope that helps,
    Rob
    Robert Chipperfield
    Red Gate
  • Options
    Hi,

    Thanks for the help Rob.

    I downloaded and ran the memory tracker tool, but doesn't list the w3wp process in the list. In fact only about half of the process in task manager are visible in the list.

    Am I doing something wrong?

    John
  • Options
    Hi John,

    I have to admit, I haven't tried using Memory Tracker on a process running as a service before - maybe it only lists those processes running as the current user. I'll take a look when I'm back in the office after Easter (on Tuesday), and get back to you then.

    Thanks,
    Rob
    Robert Chipperfield
    Red Gate
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    I usually use Performance Monitor (perfmon.exe) to examine the managed heap size. The .NET CLR Memory performance object has a #bytes in all heaps counter, and you can narrow that down to any currently-running .NET program.
Sign In or Register to comment.