Is it recommended to run dotMemory profiler in the production environment continuously?

Hello,

We are facing performance issues in our application and we have decided to perform memory profiling for any potential memory leak in the application. We are planning to setup dotMemory profiler in the production environment which will run continuously and will take snapshots based on memory consumption.

I have few questions:

  • Is it recommended to run dotMemory profiler in the production environment continuously?
  • Will it impact the application performance as the application process will attach with the profiler?
  • What are the recommendations to perform memory profiling?

It would really help us if we will get some inputs from the dotMemory team.

Thanks

Rakesh S

0
2 comments
  • Is it recommended to run dotMemory profiler in the production environment continuously?

This is not recommended. The memory profiler affects the performance of the application you are profiling, but you can use it if want to investigate memory issues reproducible on a production server.

  • Will it impact the application performance as the application process will attach with the profiler?

Attach mode doesn't allow to enable allocations collecting in "full" mode which has the biggest impact on performance. However, even if the "full" mode is disabled, memory profiler affects performance and there isn't difference whether it is "start" or "attach" mode. Attach mode supports detaching from the profiled process without stopping it which is an advantage for the production server.

  • What are the recommendations to perform memory profiling?

As mentioned above, you can use one of the two main commands:

- dotMemory start - allows to start standalone .NET application under profiling. This mode allows to enable full mode of collecting memory allocations data to get creation stack trace data for each allocated object, but it'll slow down the application the most. Besides, "start" mode doesn't support detach. Your application will be stopped if you finish profiling session.

- dotMemory attach - attach profiler to already running application. This mode supports detach. Allocations data will be collected in sampling mode. This mode is more convenient for production server. You can also attach and get only one snapshot at certain moment via dotMemory get-snapshot command e.g. when memory consumption of your application is highest. Detach will be performed automatically after this.

The other options depend on your needs. You can specify triggers to get snapshot by condition or use stdin commands to control profiling from command line. The full list of options is available in console help dotMemory help <command>, e.g. dotMemory help start. dotMemory help will show you more global options.

0

Thanks Anna for clearing out our doubts.

0

Please sign in to leave a comment.