Freigeben über


Profilers and ASP.NET

There are a lot of different ways to troubleshoot ASP.NET issues.  I have gone over most of the things you can do with a dump that has been captured from the process.  But there is another way to get useful information out of a process and that is by using a profiler.

There are a number of profilers that are available for .NET applications.  Some of the more popular ones include (most come from Brads post and there is a good list here as well):

Traditional Performance and/or Memory Profilers

Enterprise Health Monitors

The drawback with any of these profilers is that it has to be enabled prior to the process starting up.  So it is very difficult to use these to analyze a web server.

Note: SciTech has the following on their website (but I haven’t actually tested it out) - A wizard is also provided for connecting the profiler to already running processes, or to import memory dump files. This is especially useful when profiling problems in a production application.

With .NET 4.0, this will change as profilers are allowed to attach to a running process.  This will make profiling much better when dealing with ASP.NET.  Check out David’s blog for more info on that.

I have used some of these and have had my own experiences with them but I really want to hear what you guys think.

Some questions I have for you guys in regards to profilers:

  1. Do you use a profiler against your code?
  2. Which profiler(s) have you used?
  3. How much success do you have with it?
  4. Are you thinking of using a profiler to help track down any issues?
  5. What features do you think would be really useful for a profiler to have?
  6. What drawbacks keeps you from using a profiler?
  7. Would you consider running a type of profiler against your application in development if it helped you to get a better idea of performance or potential issues with your code?

Comments

  • Anonymous
    February 26, 2010
    Don't forget the Visual Studio Profiler, which works well with .NET 4.0 including in the attach case where you don't need to restart your server. Colin

  • Anonymous
    February 26, 2010
    Unfortunately attaching a profiler does not give the profilers many profiling options - at best you can create object graphs. So the issue of profilers and being there at startup still persists.  

  • Anonymous
    February 27, 2010
    The comment has been removed

  • Anonymous
    February 28, 2010
    Hi Tom, I have used Mercury products a lot for automating functional testing and performing huge scale load testing. But they are not Mercury anymore, they were sold out to HP about two or three years ago: "Products and services formerly marketed under the Mercury Interactive name have been integrated into the HP IT management portfolio and rebranded.   Although the names of these offerings have changed, the product architecture and functionality remain intact." Regards, Carlos Figueroa @carlosfigueroa

  • Anonymous
    March 02, 2010
    Yourkit looks very interesting, I haven't seen that one before now. And thanks to everyone for the feedback.

  • Anonymous
    March 30, 2010
    We have used the EQATEC Profiler a few times to identify some performance problems with an internal ASP.NET application. It is free and easy to use - definitely worth checking out. http://www.eqatec.com/tools/profiler

  • Anonymous
    November 04, 2012
    I recently came accross the Asp.Net Web Profiler. It is really handy when looking at what goes on in your web application memory. It shows an entire break down of the cache, application state and all active sessions. It shows all the sizes of everything in memory and has some drill down functionality to explore all the data and its properties. You can download it from [http://www.aspwebprofiler.com][1]. Hope this helps.

  • Anonymous
    November 25, 2012
    I use the asp.net web profiler. Shows all data used by the server with sizes for all sesisons as well. http://www.aspwebprofiler.com