ASP.Net Worker 进程内存分析工具
我们有一个相当大容量的 ASP.Net 站点,使用 MS 商务服务器用 c# 编写,在 32 位环境中运行。 我经常看到工作进程高达 980 MB。 我想分析一下这个过程,并确定在代码中可以在哪些地方获得收益,以减少该网站的内存占用。 我的问题是,哪些工具适合您在 ASP.Net Web 应用程序上执行此类操作?
我正在寻找能够给我非常具体的反馈的工具,这将真正有助于清楚地看到代码中需要更改的内容。 如果这个工具能够分析我们的生产环境工作进程以获得更具体的数据集进行比较,那就最好了。
[编辑]
到目前为止,似乎一致认为这是 Ant 和 JetBrains 之间的一个折腾。 有人用过两者吗? 如果是的话,哪一个更胜一筹,或者各自的优缺点是什么?
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. I would like to profile this process and determine where any gains could be made in code to reduce the memory foot print of this site. My question what tools have worked well for you doing this sort of thing on ASP.Net web applications?
I am looking for tools that will give me very specific feedback, that will really help to clearly see what needs to change in the code. It would be best if this tool could profile our production environment worker process for a more concrete set of data to compare.
[edit]
So far it seems the consensus is that it's a toss up between Ants and JetBrains. Has anyone used both? If so which one was superior, or what are the pros and cons of each?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
有一个免费的方法。
据我所知,上面需要 Visual Studio“终极”版本(我猜它现在称为“企业”?)。 如果您没有,请按照以下步骤操作(也非常简单)
.loadby sos clr
(这将加载允许 WinDbg 分析 .NET 进程的 SOS.dll,SOS.dll 是 NET Framework 的一部分,因此您可能已经拥有它)!dumpheap -stat
(这将输出类名,按内存使用情况升序排序。跳过system.string
和system.byte[]
类导致这些是副作用,而不是原因...)2019 年更新:WinDbg 现在可以通过 MS Store 获得,只需搜索“WinDbg”,然后单击几下即可找到。
There's a free way.
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)
.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)!dumpheap -stat
(this will output the class names, sorted by memory usage, ascending order. Skipsystem.string
andsystem.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.
ANTS Profiler 非常擅长分析 ASP.NET 应用程序。
ANTS Profiler is very good at profiling ASP.NET applications.
http://www.jetbrains.com/profiler/
http://www.jetbrains.com/profiler/
像 ANTS 内存分析器 之类的东西可能对您有用。
Something like ANTS memory profiler might be useful to you.
另请考虑自动化 QA 中的 AQTime。
Also consider AQTime from Automated QA.
JetBrains 的 dotTrace 多次救了我。
它不是免费的(可以试用),但它确实很强大!
dotTrace from JetBrains saved me several times.
It is not free (trial is available), but it is really powerfull!
我们使用 AviCode,它对我们来说效果很好。
We use AviCode, and it works pretty good for us.