.Net Memory Profiler versus Windows Resource Monitor

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.

Moderator: SciTech Software

.Net Memory Profiler versus Windows Resource Monitor

Postby patgerstle » Wed Oct 22, 2014 7:48 pm

When I run the .Net Memory Profiler on a running Windows service looking for memory leaks, I see New Live Bytes increasing at maybe several hundred an hour with Live Bytes at about 106,000.

When I watch the service in Windows Resource Monitor, I see the Commit (KB) at 84,500 and steadily increasing at about 4 MB an hour.

Makes no sense to me - Are these things related at all? Or I am way off base as to what I am looking at?

Posts: 1
Joined: Wed Oct 22, 2014 7:36 pm

Re: .Net Memory Profiler versus Windows Resource Monitor

Postby Andreas Suurkuusk » Thu Oct 23, 2014 3:53 pm

The Commit memory presented by the Windows Resource Monitor should be compared to the "Private committed" memory under the "Native memory" view of the profiler. The managed heaps are a part of this memory, but this memory is also used for unmanaged memory resources, such as memory allocated using HeapAlloc and VirtualAlloc.

In your case it seems like you might have an unmanaged memory leak. To get more information about the unmanaged memory usage you can use the unmanaged resources tracker. To use the resources tracker you need to start your service using the profiler (i.e. you cannot attach to the process). Use the command "Profile Windows service", click "Next" a few times and enable the unmanaged resources tracker. The first time you profile a process with the resources tracker enabled, symbol files need to be loaded, which can cause the profiled process to run very slowly. This will be faster on subsequent runs.

Hopefully the information presented by the resources tracker will help you locate the memory problem.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
Posts: 995
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Return to Using .NET Memory Profiler

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

SciTech Software logo

© Copyright 2001-2016. SciTech Software AB
All rights reserved.

SciTech Software AB
Kartvägen 21
SE-175 46 Järfälla

E-mail: mail@scitech.se

Telephone: +46-706868081