ASP.NET Worker Process Memory Profile Tools

We have a fairly large ASP.NET site written in C # using an MS commerce server running in a 32-bit environment. I often see workflows up to 980 megabytes. I would like to talk about this process and determine where it would be possible to get any gain in the code in order to reduce the print footprint of this site. My question is, what tools worked well for you, doing such things in ASP.Net web applications?

I am looking for tools that will give me very specific reviews that really help to clearly see what needs to be changed in the code. It would be better if this tool could profile the workflow of a work environment for a more specific data set for comparison.

[edit]

So far, the consensus seems to be that it rises between Ants and JetBrains. Has anyone used both? If so, which one was higher, or what are the pros and cons of each?

+5
source share
7 answers

ANTS Profiler is very good for profiling ASP.NET applications.

+7
source

There is a free path.

  • start task manager
  • right click w3wp process
  • select "create a dump" (I am amazed at how few people know about this feature, including me at some point!)
  • copy the dump file to your local computer (so that we do not disturb the working server)
  • open file in visual studio
  • enjoy
  • select "Managed memory debugging" for an extended view of which class uses memory, etc.

AFAIK, the above requires the Visual Studio "Ultimate" edition (I think it is now called "Enterprise"?). If you donโ€™t have one, follow these steps (also very simple)

  • run WinDbg (a free tool, part of the Windows SDK, here in StackOverflow, there are many answers to the question of how to download WinDbg without all SDK media)
  • Press Ctrl + D and load the dump file into WinDbg
  • type .loadby sos clr (this will load the SOS.dll file, allowing WinDbg to analyze .NET processes, the SOS.dll file is part of the NET Framework, so you probably already have it)
  • type !dumpheap -stat (this will output the class names sorted by memory usage in ascending order. system.byte[] of the system.string and system.byte[] classes leads to the fact that these are side effects, not the reason ... )

UPDATE FROM 2019: WinDbg is now available through the MS Store, just search for โ€œWinDbgโ€, then a couple of clicks and it is there.

+7
source

Something like the ANTS memory profiler might be useful for you.

+1
source

Also consider AQTime from Automated QA.

+1
source

We use AviCode and it works very well for us.

0
source

dotTrace from JetBrains saved me several times. It is not free (a trial version is available), but it is really powerful!

0
source

Source: https://habr.com/ru/post/1286158/


All Articles