Suddenly high memory consumption with the profiling.

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Guido17
Posts: 3
Joined: Tue Mar 03, 2009 9:32 am

Suddenly high memory consumption with the profiling.

Post by Guido17 » Tue Mar 03, 2009 10:05 am

I examine a big application with many internal and external components with the "MemoryProfiler".
This application needs 240 MB of memory and 300 mb of virtual memory without MemoryProfiler.

I have a phenomenon if everything well runs, I have with the MemoryProfiler 700 mb of memory
and 800 mb of virtual memory. Then MemoryProfiler has 250 mb and 300 mb.

If I change now components, only one little thing, a profiling is not possible any more.
Then the application has 1.2 GB of memory and 1.4 GB of virtual memory (with out of memory exception).
MemoryProfiler 500 mb of memory and 600 mb of virtual memory.
If I change back or reinstall the application, the state remains.
After days I have created it then anyhow that a profiling is possible and
suddenly again this mistake state. I know in addition no more advice.

How can I examine such a state even closer?

Guido17
Posts: 3
Joined: Tue Mar 03, 2009 9:32 am

Important Information

Post by Guido17 » Tue Mar 03, 2009 10:25 am

MemoryProfiler Version 2.6.97

Settings:
General:
Enable: "Automatically..."
Enabel: "When saving..."
Maximum number ... 2 (10 before)
Load debug ..
Enable: When running under ...

Interactive:
Enable: Collect realtime ...
Maximum ... global .. 1024
Maximum ... class .. 2048
Disable: Enable low impact ...
Disable: Enable dispose ...
Enable: Enable root ref...
Enable: Enable heap ...
Disable: Disable inlining

Non-Interactive: Default
Memory leak detection: Default

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Tue Mar 03, 2009 8:44 pm

I don't fully understand what the problem is. After you changed something in your application, the memory usage increased. Did it only increase when profiling, or when running without the profiler as well?

When profiling, the memory usage of the profiled process will increase significantly. If the profiler fails to allocate memory (within the profiled process), profiling will fail. If the memory usage is up to 1.4 GB, there is a very big risk that a memory allocation will fail in a 32-bit process.

I don't know if it is related to your problem, but if you have installed later version of the .NET Framework than 2.0 (including 2.0 SP1), I recommend that you disable root identification. Root identification requires a workaround for a bug in the framework and since .NET Memory Profiler 2.6 was designed for .NET Framework 2.0, this workaround has not been updated for later framework versions.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Guido17
Posts: 3
Joined: Tue Mar 03, 2009 9:32 am

Post by Guido17 » Wed Mar 04, 2009 7:45 am

Hi,

thank you for your fast answer.

I know, this is really heavy to understand and to describe.
The problem appears only with the Profiling. I try to explain it over again more clearly.

State 1: Well case
Both my applications and MemoryProfiler have satisfactory memories consumption
(application 700 mb and virtual 800 mb, MemoryProfiler 250 mb and virtual 300 mb)

State 2: Worse case
Both my applikaiton and MemoryProfiler need a lot of memories
(application 1.2 GB and virtual 1.4 GB, MemoryProfiler 500 mb and virtual 600 mb)
Why I do not know, the change is unclear, this passed suddenly if I exchange component (e.g., insertion of Debug Dlls).

Why I do not know, the change is unclear, this passed suddenly if I exchange component
(e.g., insertion of Debug Dlls). Even if I restore the original component or reinstall
my application, this state and then suddenly remains it goes again.
I think it gives a state in my Applikaiton, where to analyze a lot of data of the MemoryProfiler tried.
Can one analyze this state about a log of the MemoryProfiler?

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Thu Mar 05, 2009 7:06 pm

I'm still not able to come with an explanation for your problem. To get more information about this, it might help if you provide us with some log-files.

The log-files are created by providing the "/log" command line parameter to the profiler executable (e.g. using the Run command and entering "C:\Program files\SciTech\NetMemProfiler2\NetMemProfiler.exe" /log).

This will create three log-files: ProfilerLog.txt, ProfilerClientLog.txt and AssertLog.txt. In v2.6, the log-files are be created in the installation folder of the profiler. It is probably best if you can create a set of log-files where the memory usage is "normal", and one set after you have experienced high memory usage.

Please send these files to support@scitech.se (preferably zipped).
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests