ASP.Net Worker Process Memory Profile Tools

后端 未结 7 1949
星月不相逢
星月不相逢 2021-01-01 03:46

We have a fairly high volume ASP.Net site written in c# using MS commerce server, running in a 32-bit environment. I see the worker process up to 980 megabytes quite often.

相关标签:
7条回答
  • 2021-01-01 04:09

    http://www.jetbrains.com/profiler/

    0 讨论(0)
  • 2021-01-01 04:11

    Something like ANTS memory profiler might be useful to you.

    0 讨论(0)
  • 2021-01-01 04:19

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

    0 讨论(0)
  • 2021-01-01 04:20

    We use AviCode, and it works pretty good for us.

    0 讨论(0)
  • 2021-01-01 04:21

    Also consider AQTime from Automated QA.

    0 讨论(0)
  • 2021-01-01 04:24

    There's a free way.

    • launch the task manager
    • right-click the w3wp process
    • select "create dump" (I'm amazed how few people know about this feature - including myself at some point!)
    • copy the dump file to your local machine (so we don't bother the production server)
    • open the file in Visual Studio
    • enjoy
    • select "Debug Managed memory" for advanced view which class uses memory etc.

    AFAIK, the above requires Visual Studio "Ultimate" edition (I guess its called "Enterprise" now?). If you don't have one, then follow these steps (very simple too)

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

    UPDATE FROM 2019: WinDbg is now available via MS Store, just search for "WinDbg", then couple of clicks and its there.

    0 讨论(0)
提交回复
热议问题