如何获取大量内存使用的完整内存转储
我在四核 8G 机器上运行的 Windows 2008 64 位系统上托管基于 IIS 的 Web 服务应用程序。当 W3WP 以 7.6G 内存使用量运行时,遇到了几个实例。系统上没有任何其他内容响应,包括 RDP。右键单击任务管理器中的进程并创建转储,会长时间冻结系统及其所有线程(接近 30 分钟)。当冻结发生在非工作时间时,我们让转储运行一段时间(运行了接近 1 小时),但转储仍然没有完成。为了让系统启动,我们不得不杀死 IIS
尝试了其他工具,如 procexp、debug diag 等来创建完整的内存转储,并且都具有相同的结果
那么,社区使用什么工具来快速获取转储文件?或者不冻结所有线程?我意识到后者可能是一个反问句。但是,在不长时间锁定系统的情况下生成如此大的转储文件的选项是什么?
I am hosting IIS based web service applications on Windows 2008 64-bit system running on a Quad core 8G machine. Ran into couple of instances when W3WP was running at 7.6G of memory usage. Nothing else was responding on the system including RDP. Right click on the process from the task manager and creating the dumps, froze the system and all its threads for a long time (close to 30minutes). When the freeze up occurred during off hours, we let the dump run for a while (ran close to 1 hour) but still dump didn't complete. In the interest of getting the system up, we had to kill IIS
Tried other tools like procexp, debug diag etc to create full memory dump and all have the same results
So, what tool does the community use to grab dump files quickly? Or without freezing all the threads? I realize latter might be a rhetorical question. But what are the options for generating such a large dump file without locking up the system for a long time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
IMO 您不必等到进程内存增长到 8 GB。我确信对于 3 - 4 GB 的内存,您应该能够检测到内存泄漏。
Procdump 有一个基于内存阈值的选项
我希望您可以使用此选项来转储进程的内存。
SSD 也有助于加快写入速度。
IMO you shouldn't have to wait until the process memory grows to 8 GB. I am sure with something like 3 - 4 GB you should be able to detect the memory leak.
Procdump has an option based on memory threshold
I would you this option to dump the memory of the process.
And also SSD would help in writing faster.
WPA 又名 xperf (http://msdn.microsoft.com/en-us/performance/cc825801.aspx) 是一个强大的工具,用于诊断应用程序。您将获得罪魁祸首分配的调用堆栈。您不必收集转储,它是非侵入性的,并且不会在生产系统中加载太多
完整的分步信息可在此处获得。 http://msdn.microsoft.com/en- us/library/ff190906(v=VS.85).aspx。
WPA a.k.a xperf (http://msdn.microsoft.com/en-us/performance/cc825801.aspx) is a powerfull tool, to diagnose the applications. You will get call stack of the culprit allocation. You dont have to collect the dump and it is no-invasive and does not load much in production systems
Complete step by step information is available here. http://msdn.microsoft.com/en-us/library/ff190906(v=VS.85).aspx.