none
Exac RRS feed

  • Question

  • Hi All,

    Below is the log of my application it's a desktop application with multithreaded supprot i am confused and finding nothing good in this App. but how to start to tune this application. Means which one is the most critical part according to log. also i am not able to dig out objects residing in gen-2 it is consistentely increasing.

    Allocated bytes:                  1761110444
    Relocated bytes:                  25868416

    Final Heap bytes:                 6792134
    Objects finalized:                33192
    Critical objects finalized:       6433


    Gen 0 collections:                189
    Gen 1 collections:                28
    Gen 2 collections:                3
    Induced collections:              0

    Gen 0 Heap bytes:                 1130991
    Gen 1 Heap bytes:                 784717
    Gen 2 Heap bytes:                 3009249
    Large Object Heap bytes:          408437

    Handles created:                      30323
    Handles destroyed:                    27950
    Handles surviving:                    2'337


    Heap Dumps:                               0
    Comments:                                 0

     

    Monday, October 25, 2010 11:40 AM

Answers

  • We'll, you haven't had that many Gen 2 collections (I see 3).  When the system has a lot of memory, the full collection occurs infrequently.  Try running a GC.Collect call to force a collection of all generations and see if that causes it to go down.  If so, that probably means that there wasn't anything to be concerned about in the first place.

    If it will not go down, then you have a "leak".  Something live is still referencing objects.  For example, they might have been added to a List or Dictionary that is still alive.  There are memory profiling tools to help you find these.

    See http://blogs.msdn.com/b/delay/archive/2009/03/11/where-s-your-leak-at-using-windbg-sos-and-gcroot-to-diagnose-a-net-memory-leak.aspx, especially many of the links.  (Much of this mentions SOS commands.  You don't necessarily need WinDbg to use these.  So long as you have set Visual Studio up for "unmanaged debugging enabled", they will work in the Visual Studio command window too: http://msdn.microsoft.com/en-us/library/bb190764.aspx)

     

     

     

    • Marked as answer by eryang Friday, November 5, 2010 9:08 AM
    Monday, October 25, 2010 10:26 PM

All replies

  • We'll, you haven't had that many Gen 2 collections (I see 3).  When the system has a lot of memory, the full collection occurs infrequently.  Try running a GC.Collect call to force a collection of all generations and see if that causes it to go down.  If so, that probably means that there wasn't anything to be concerned about in the first place.

    If it will not go down, then you have a "leak".  Something live is still referencing objects.  For example, they might have been added to a List or Dictionary that is still alive.  There are memory profiling tools to help you find these.

    See http://blogs.msdn.com/b/delay/archive/2009/03/11/where-s-your-leak-at-using-windbg-sos-and-gcroot-to-diagnose-a-net-memory-leak.aspx, especially many of the links.  (Much of this mentions SOS commands.  You don't necessarily need WinDbg to use these.  So long as you have set Visual Studio up for "unmanaged debugging enabled", they will work in the Visual Studio command window too: http://msdn.microsoft.com/en-us/library/bb190764.aspx)

     

     

     

    • Marked as answer by eryang Friday, November 5, 2010 9:08 AM
    Monday, October 25, 2010 10:26 PM
  •  

    We temporarily mark a reply, please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, November 5, 2010 9:09 AM