profiling .net windows service

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
hitenamin
Posts: 1
Joined: Tue Oct 09, 2007 12:43 am

profiling .net windows service

Post by hitenamin » Tue Oct 09, 2007 12:44 am

Hi,

I am using Memory Profiler 2.6 to profile .net 2.0 windows service.

We are doing processing in the service, where if it detects a record in database, it updates it to inprocess from pending and then does lot of work. The service is hogging 1+GB of memory and I am trying to find why its happening.

When I start the service from .net memory profiler, it starts the service, however, it service does not change the record to InProcess from pending (I think its not executing this code, may be its on a different thread? I am just guessing). In general our overall process takes 1to 2 hour to finish, but when used from .net memory profiler, it did not finish it at all, When I tried to take snapshot in between, it hung the app keeping service running and hence I could not take the snapshot. When tried to close app, it asked me to save the session, when I provided the path, it showed a message saying could not save, memory could be corrupted.

if I run the service without memory profiler, everything works as expected (ofcourse with memory loading)

Can you please guide me how to resolve this issue?

Thanks,

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

Post by Andreas Suurkuusk » Tue Oct 09, 2007 1:54 pm

Profiling a process that uses over 1GB of memory can be problematic, since the profiler adds significant memory overhead to the process. If the profiled process actually runs out of memory, the profiler will not be able collect any data. However, in v2.6.97 we implemented a few memory allocation improvements in the profiler, which might help in your case. If you're running an older version than this, I recommend that you download the latest release from http://memprofiler.com/download.aspx (the v2.6 download is available at the bottom of the page).

You can also reduce the memory consumption of the profiler by enabling low-impact profiling (under the "Interactive" tab in the Tools->Settings dialog).
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests