高内存使用率--- RegionUsageIsVAD [英] High Memory Usage --- RegionUsageIsVAD

查看:115
本文介绍了高内存使用率--- RegionUsageIsVAD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的NT服务在运行一天后因内存不足异常"而崩溃了;当我分析转储文件时,我发现gcheap仅为160MB,而本机堆约为300MB,但是虚拟类型为"RegionUsageIsVAD"的存储器; 约为1.3GB.但是,我搜索了我的源代码,没有"virtualalloc" api调用,我不明白为什么虚拟内存使用率很高,但是gcheap和本机堆的使用率很低.谢谢!

转储报告如下:

 0:067> !eeheap -gc
GC堆数:1
第0代始于0x72dff784
第1代始于0x72d564f8
第2代始于0x01441000
临时段分配上下文:(0x732ff78c,0x732ff798)
 段开始分配的大小
01440000 01441000 02419368 0xfd8368(16614248)
070a0000 070a1000 0808a904 0xfe9904(16685316)
090b0000 090b1000 0a09e4dc 0xfed4dc(16700636)
0a480000 0a481000 0b46bf18 0xfeaf18(16690968)
16f50000 16f51000 17f35e64 0xfe4e64(16666212)
186f0000 186f1000 196ec5e4 0xffb5e4(16758244)
196f0000 196f1000 1a6d5284 0xfe4284(16663172)
47240000 47241000 481b296c 0xf7196c(16193900)
72ac0000 72ac1000 732ff78c 0x83e78c(8644492)
大对象堆从0x02441000开始
 段开始分配的大小
02440000 02441000 033d0fd8 0xf8ffd8(16318424)
2f450000 2f451000 2f791040 0x340040(3407936)
总大小:大小:0x99de83c(161343548)字节.
------------------------------
GC堆大小:大小:0x99de83c(161343548)字节.

--------------------使用摘要--------------------------
    TotSize(KB)Pct(点)Pct(忙)用法
   4fe0c000(1308720):62.41%70.56%:RegionUsageIsVAD
    ec9d000(242292):11.55%00.00%:RegionUsageFree
    9922000(156808):07.48%08.45%:RegionUsageImage
    6dfe000(112632):05.37%06.07%:RegionUsageStack
          0(0):00.00%00.00%:RegionUsageTeb
   10e26000(276632):13.19%14.91%:RegionUsageHeap
          0(0):00.00%00.00%:RegionUsagePageHeap
       1000(4):00.00%00.00%:RegionUsagePeb
          0(0):00.00%00.00%:RegionUsageProcessParametrs
          0(0):00.00%00.00%:RegionUsageEnvironmentBlock
       收件人:7fff0000(2097088 KB)忙:71353000(1854796 KB)

--------------------类型摘要--------------------------
    TotSize(KB)百分数(Tots)用法
    ec9d000(242292):11.55%:<免费>
    a440000(168192):08.02%:MEM_IMAGE
     ffd000(16372):00.78%:MEM_MAPPED
   65f16000(1670232):79.65%:MEM_PRIVATE

--------------------状态摘要--------------------------
    TotSize(KB)百分数(Tots)用法
   64112000(1639496):78.18%:MEM_COMMIT
    ec9d000(242292):11.55%:MEM_FREE
    d241000(215300):10.27%:MEM_RESERVE

最大的免费区域:基本61d20000-大小00d60000(13696 KB)


解决方案

您好

这是您可以参考的示例

http://www.asprangers.com/post/2012/04/03/Beware-Tracing-in-ASPNET-can-lead-to-Memory-leaks-eventually-OOM.aspx

由于我不知道您的真实情况是什么,因此您必须不断研究演示

此外,以下链接似乎是一个不错的博客,其中包含有关CLR GC的详细信息

https://blogs.msdn.microsoft.com/maoni/

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

使用Internet上发现的任何软件都存在固有的危险,Microsoft提醒您在从Internet上检索任何软件之前,请确保您完全了解风险.

最诚挚的问候,

克里斯汀


I have a NT Service crashed after run for one day,it caused by "out of memory exception";When i analyzed the dump file, i found the gcheap was only about 160MB,and the native heap was about 300MB,but the virtual memory which type is "RegionUsageIsVAD" was about 1.3GB. however I searched my source code,there's no "virtualalloc" api call,I can't understand why the virtual memory usage was high,but the usage of gcheap and native heap was low. Thanks!

the dump report as below:

0:067> !eeheap -gc
Number of GC Heaps: 1
generation 0 starts at 0x72dff784
generation 1 starts at 0x72d564f8
generation 2 starts at 0x01441000
ephemeral segment allocation context: (0x732ff78c, 0x732ff798)
 segment     begin allocated  size
01440000  01441000  02419368  0xfd8368(16614248)
070a0000  070a1000  0808a904  0xfe9904(16685316)
090b0000  090b1000  0a09e4dc  0xfed4dc(16700636)
0a480000  0a481000  0b46bf18  0xfeaf18(16690968)
16f50000  16f51000  17f35e64  0xfe4e64(16666212)
186f0000  186f1000  196ec5e4  0xffb5e4(16758244)
196f0000  196f1000  1a6d5284  0xfe4284(16663172)
47240000  47241000  481b296c  0xf7196c(16193900)
72ac0000  72ac1000  732ff78c  0x83e78c(8644492)
Large object heap starts at 0x02441000
 segment     begin allocated  size
02440000  02441000  033d0fd8  0xf8ffd8(16318424)
2f450000  2f451000  2f791040  0x340040(3407936)
Total Size:              Size: 0x99de83c (161343548) bytes.
------------------------------
GC Heap Size:            Size: 0x99de83c (161343548) bytes.

-------------------- Usage SUMMARY --------------------------
    TotSize (      KB)   Pct(Tots) Pct(Busy)   Usage
   4fe0c000 ( 1308720) : 62.41%    70.56%    : RegionUsageIsVAD
    ec9d000 (  242292) : 11.55%    00.00%    : RegionUsageFree
    9922000 (  156808) : 07.48%    08.45%    : RegionUsageImage
    6dfe000 (  112632) : 05.37%    06.07%    : RegionUsageStack
          0 (       0) : 00.00%    00.00%    : RegionUsageTeb
   10e26000 (  276632) : 13.19%    14.91%    : RegionUsageHeap
          0 (       0) : 00.00%    00.00%    : RegionUsagePageHeap
       1000 (       4) : 00.00%    00.00%    : RegionUsagePeb
          0 (       0) : 00.00%    00.00%    : RegionUsageProcessParametrs
          0 (       0) : 00.00%    00.00%    : RegionUsageEnvironmentBlock
       Tot: 7fff0000 (2097088 KB) Busy: 71353000 (1854796 KB)

-------------------- Type SUMMARY --------------------------
    TotSize (      KB)   Pct(Tots)  Usage
    ec9d000 (  242292) : 11.55%   : <free>
    a440000 (  168192) : 08.02%   : MEM_IMAGE
     ffd000 (   16372) : 00.78%   : MEM_MAPPED
   65f16000 ( 1670232) : 79.65%   : MEM_PRIVATE

-------------------- State SUMMARY --------------------------
    TotSize (      KB)   Pct(Tots)  Usage
   64112000 ( 1639496) : 78.18%   : MEM_COMMIT
    ec9d000 (  242292) : 11.55%   : MEM_FREE
    d241000 (  215300) : 10.27%   : MEM_RESERVE

Largest free region: Base 61d20000 - Size 00d60000 (13696 KB)


解决方案

Hi Samlin86

RegionUsageIsVAD is high, it indicates that most memory is in virtual allocations. .NET heaps are made with calls to VirtualAlloc. The GC in .NET uses the Microsoft Win32® VirtualAlloc() API to reserve a block of memory for its heap. Depending on the flavor of GC in use, it may be 32 MB (Workstation GC) allocations or 64 MB (Server GC). For ASP.net applications running in IIS, by default, the Server GC is automatically selected, if the computer has 2 or more processors.

Here is a sample you can refer to

http://www.asprangers.com/post/2012/04/03/Beware-Tracing-in-ASPNET-can-lead-to-Memory-leaks-eventually-OOM.aspx

Since I don't know what your real scenario is, you must research on your demo continuously

In addition, the following link seems to be a good blog with details about the CLR GC

https://blogs.msdn.microsoft.com/maoni/

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.

There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Best regards,

Kristin


这篇关于高内存使用率--- RegionUsageIsVAD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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