进程分配ram的演出,如何从DMP或其他方式进行分析 [英] Process allocates gigs of ram, how to analyze from DMP or other means

查看:100
本文介绍了进程分配ram的演出,如何从DMP或其他方式进行分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个长时间运行的进程,运行在数百个站点上。
它是一个64位进程,以Managed exe WCF服务开始,然后填充到本机DLL中
该exe是一个Windows服务

WCF服务接收传入的非托管内存流并将它们传递给本地dll

dll传回非托管内存流或压缩结果在一个文件中,它被传输到调用者


在两个站点,这个过程在24小时内消耗了几千兆字节的内存.b
如何分析现场的内存分配?

我试过获得DMP并寻找在DebugDiag和Windbg中,但minidump似乎没有足够的信息


<如果我试图获得一个完整的转储,它将是16次演出 - 是否值得花时间来获取它


我尝试使用procdump和TaskManager获取DMP文件,但他们似乎没有足够的状态来分析内存分配


该网站是一个24/7商店所以我不想尝试使用附加工具重新启动服务器

解决方案

您好,


感谢您在此发帖。


在分析DMP文件时遇到了一些问题,据我所知,windbg是一个非常强大的工具来分析内存泄漏问题。 Microsoft有
指定论坛
支持它。 


>>"
在两个站点,这个过程消耗了几千兆字节ram超过24小时
 "


当本机dll传回非托管内存时,本机dll函数是否释放了托管内存。当wcf将这些内存传递给本机dll时,您是否使用了值复制或地址复制?


您是否收到其他错误消息或异常,哪句话抛出异常,这些信息对于解决问题。 


以下链接是关于如何阅读DMP文件的,我希望它会有所帮助。


读取memory.dmp或其他.dmp文件


调试
使用windbg进行内存转储的托管代码内存泄漏


最好的问候,


Hart


注意:此响应包含对第三方万维网站点的引用。 Microsoft提供此信息是为了方便您。 Microsoft不控制这些网站,也未测试在这些网站上找到的任何软件或信息;因此,
Microsoft不能对在那里找到的任何软件或信息的质量,安全性或适用性做出任何陈述。




I have a long running process that runs at hundreds of sites
Its a 64bit process that begins with a Managed exe WCF service, then shims into a native DLL
That exe is a Windows Service
The WCF service takes incoming unmanaged memory streams and passes them to the native dll
The dll passes back unmanaged memory streams or compressed results in a file, which are streamed to the caller

At two sites, the process is consuming several gigabytes of ram over a 24 hour period
How can I analyze the memory allocation onsite?
I tried getting a DMP and looking in DebugDiag and Windbg but minidump seems not to have enough information

If I try to get a full dump, its going to be 16 gigs - will it be worth the time to get it

I tried getting DMP files with procdump and TaskManager, but they seem not to have enough state to analyze the memory allocations

The site is a 24/7 shop so I dont want to try restarting the server with tools attached to it

解决方案

Hi,

Thank you for posting here.

Did you encounter some issue when you analysis the DMP file, As far as i know that the windbg is a very power tool to analysis memory leak issue. The Microsoft has a specified forum to support it. 

>>" At two sites, the process is consuming several gigabytes of ram over a 24 hour period "

When the native dll passes back unmanaged memory, did the native dll function release the managed memory. when wcf passes these memory to native dll, did you use value copy or address copy?

Did you get other error message or exception, which sentence throw the exception, these information will be important to solve issue. 

the following links are about how to read DMP file, I hope it would be helpful.

Reading a memory.dmp or other .dmp file

Debugging managed code memory leak with memory dump using windbg

Best Regards,

Hart

Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.


这篇关于进程分配ram的演出,如何从DMP或其他方式进行分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆