决定谁/什么w3wp.exe的保留的虚拟内存的5.5 GB [英] Determine who/what reserved 5.5 GB of virtual memory in w3wp.exe

查看:194
本文介绍了决定谁/什么w3wp.exe的保留的虚拟内存的5.5 GB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的机器上(XP,64)的ASP.net工作进程(w3wp.exe的)总是与5.5GB推出的虚拟内存保留。出现这种情况,无论它是承载Web应用程序(也可以是任何东西,甚至在ASPX一个空的网页)。

On my machine (XP, 64) the ASP.net worker process (w3wp.exe) always launches with 5.5GB of Virtual Memory reserved. This happens regardless of the web application it's hosting (it can be anything, even an empty web page in aspx).

虚拟内存的这个大旧块是在过程开始的时刻保留的,所以这是不是某种类型的内存逐渐泄漏。

This big old chunk of virtual memory is reserved at the moment the process starts, so this isn't a gradual memory "leak" of some sort.

一些与周围的WinDbg窥探显示内存的问题是私人,保留和RegionUsageIsVAD,这表明它可能是有人在叫VirtualAlloc的工作。这也表明,有问题的内存分配/ 1GB的每4大块和几个较小的保留(1 / 4GB的每个)。

Some snooping around with windbg shows that the memory is question is Private, Reserved and RegionUsageIsVAD, which indicates it might be the work of someone calling VirtualAlloc. It also shows that the memory in question is allocated/reserved in 4 big chunks of 1GB each and a several smaller ones (1/4GB each).

所以我想我需要弄清楚谁是调用的VirtualAlloc和保留这一切的记忆。我该怎么做呢?

So I guess I need to figure out who's calling VirtualAlloc and reserving all this memory. How do I do that?

附加一个调试器之前的内存分配的过程是棘手的,因为w3wp.exe的是中svchost.exe启动的进程(即IIS / ASP.Net过滤器),如果我尝试推出它自己为了调试它,它只是关闭不下来这一切丰富的内存预留。此外,命令行参数,如果我resuse它们(这是有道理的,因为它是由调用进程创建的管道)无效。

Attaching a debugger to the process prior to the memory allocation is tricky, because w3wp.exe is a process launched by svchost.exe (that is, IIS/ASP.Net filter) and if I try to launch it myself in order to debug it it just closes down without all this profuse memory reservation. Also, the command line parameters are invalid if I resuse them (which makes sense because it's a pipe created by the calling process).

我可以附加在事后它的WinDbg的进程(这是我发现有问题的内存区域),但我不知道它可能在这一点上,以确定谁分配了什么。

I can attach windbg it to the process after the fact (which is how I found the memory regions in question), but I'm not sure it's possible at that point to determine who allocated what.

推荐答案

王大卫<一个href=\"http://blogs.msdn.com/david.wang/archive/2006/02/14/More-on-Virtual-Memory-Memory-Fragmentation-and-Leaks-and-WOW64.aspx#541133\">answers这类似的问题:

[...]在ASP.Net开发表现告诉我说:

[...] the ASP.Net performance developer tells me that:


      
  • 保留的虚拟内存是没有什么可担心的。您可以查看
      它作为性能/缓存prerequisite
      的CLR。大负荷测试
      表明,它是没有什么可担心
      关于。

  •   
  • System.Windows.Forms的 - 它不是空的hello world ASPX在拉
      页。您可以使用Microsoft调试
      工具和SXËLD
      System.Windows.Forms的确定哪些
      在运行时实际上是拉进去。
      或者你可以ILDASM找到
      依赖。

  •   
  • mscorlib程序 - 确保它是GAC'd和NGen'd正确

  •   

这篇关于决定谁/什么w3wp.exe的保留的虚拟内存的5.5 GB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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