none
windbg Huge number of System.Web.DirMonCompletion in generation 2 RRS feed

  • Question

  • Hi

    First some information about our system.

    Its one web application running on multiple servers. We are running windows server 2008 r2 web edition.

     

    We see a huge number of System.Web.DirMonCompletion objects in gen 2.

    Anyone know what can cause this?

     

    #objects     #Total size

    64,651    3,620,456   Class Name System.Web.DirMonCompletion

    It seems to be rooted to System.Web.NativeFileChangeNotification:

     

    DOMAIN(00000000035C30E0):HANDLE(Strong):8202950:Root:  000000026fbc81e8(System.Web.NativeFileChangeNotification)-> 000000026fbc81b0(System.Web.DirMonCompletion)

    I have read http://blogs.msdn.com/b/tmarq/archive/2007/11/02/asp-net-file-change-notifications-exactly-which-files-and-directories-are-monitored.aspx


    Thursday, May 12, 2011 10:00 AM

All replies

  • Does the web application use CacheDependency type?

     

    System.Web.DirMonCompletion is an internal type of System.Web.dll, the total size of System.Web.DirMonCompletion objects is about 3MB, are you suffering a huge-memory-usage issue?


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 13, 2011 1:31 AM
  • No, we do not use cachedependency. I also located it back to being used by the cache and also for monitoring files such as web.config etc.

    The problem we have is that the % time in GC is very high (~50%) and that we have about 40000 soft page faults (caused by the w3wp). And during that investigation we noticed this high number of gen 2 collections and saw that it was rooted to the DirMonCompletion.

    Any more ideas?

    Friday, May 13, 2011 5:56 AM
  • So, it's more like a performance issue, isn't it?

     

    High "% time in GC" counter usually indicates that too many Gen2 GC, or Gen2 GC takes too long time, did you call GC.Collect() manually in your code? Generally, 10 Gen0 GC triggers 1 Gen1 GC, 10 Gen1 GC triggers 1 Gen2 GC, you can monitor "# Gen 0 Collections”, “# Gen 1 Collections”, "# Gen 2 Collections" counters in Windows Performance Monitor to determine whether the GC frequent is in a health status.

     

    By the way, following articles discuss details on similar issue, you may want to have a read:

     

    GC Performance Counters

    Using GC Efficiently


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by eryang Monday, May 23, 2011 3:59 AM
    • Unproposed as answer by PatrikC Monday, May 23, 2011 7:57 PM
    Monday, May 16, 2011 3:57 AM
  • No we do not call GC.Collect() manually.

    I understand that many gen2 is bad. What I dont know is where they come from. I dont find anything in the code that triggers a System.Web.NativeFileChangeNotification.

    Monday, May 23, 2011 7:56 PM
  • Size of Gen2 heap is much bigger than size of Gen0 and Gen1 heap, so Gen2 objects' count is supposed to be "huge". However, since the "% time in GC" of this application is about 50% which indicates a performance issue, you may following this blog to dig into this issue, please feel free to let us know if you encounter any concern when go through that blog.

     

    By the way, you can try http://forums.asp.net forum for what code/configuration triggers System.Web.NativeFileChangeNotification objects.


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by eryang Friday, May 27, 2011 6:16 AM
    Tuesday, May 24, 2011 5:49 AM