none
High Memory Usage --- RegionUsageIsVAD RRS feed

  • Question

  • 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)

    Saturday, October 29, 2016 6:43 AM

All replies

  • 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


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.






    • Edited by Kristin Xie Monday, October 31, 2016 3:19 AM
    • Proposed as answer by Kristin Xie Tuesday, November 8, 2016 1:10 AM
    Monday, October 31, 2016 3:13 AM