Analyzing .Net Application Memory Usage And Issues

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Analyzing .Net Application Memory Usage And Issues - Presentation Transcript

    1. Analyzing .NET Application Memory Usage and Issues Using Free and Commercial Profiling Tools Presented by Greg Sohl © 2006, Gregory M. Sohl
    2. Memory Issues? Huh?
      • .NET has Garbage Collection. I don’t have to worry about memory anymore!
      • Users have lots of memory now. I don’t have to worry about using lots of memory anymore!
      • Windows has virtual memory space. I don’t have to worry about using lots of memory anymore!
    3. Common .NET Memory Issues
      • Too much allocation
      • Memory allocations are long lived
      • Managed memory leaks – reference leaks
      • Work “with” the Garbage Collector. It’s your friend - but only if you are nice to it.
    4. Why Use a Profiling Tool?
      • To understand how your allocations correspond with the assumptions made by the GC
      • Track unintentional references to instances (leaks)
      • Track references that are being held too long
    5. 3 Allocation Profilers
      • .NET Memory Profiler – SciTech
        • Commercial – best of breed
      • Ants Profiler – Red Gate
        • Commercial – Useful, but light weight feature set
      • CLR Profiler 2.0 – Microsoft
        • Free – Powerful, but challenging to use
      • Others listed in resources
    6. Definitions
      • Root – The base object holding references to other objects
        • Examples: A static field, a local variable or a method parameter.
      • Root Path - The path of referees from the selected instance to a root
      • Garbage Collection – The process by which objects with no root (unreachable objects) are cleaned up from the heap.
    7. Sample - Conway’s Game of Life
      • A simulation of cellular automation.
      • http://en.wikipedia.org/wiki/Conway's_Game_of_Life
      Pulsar Pattern
    8. Demo - .NET Memory Profiler
      • Cream of the crop profilers
      • Can attach to running processes
      • Show native memory usage
      • Great real-time view
      • Copy grids to clipboard
      • Low impact mode
    9. Demo - CLR Profiler 2.0
      • For the MacGyver in you.
      • A robust tool, without all the modern conveniences.
    10. Demo - Ants Profiler
      • Good tool with basic features
      • Memory analysis a recent addition to execution analysis
      • No real-time or IDisposble analysis
      • Best thread support
    11. Resources
      • .NET Memory Profiler
        • http://memprofiler.com/
      • Ants Profiler
        • http://www.red-gate.com
      • CLR Profiler 2.0
        • http://www.microsoft.com/downloads/details.aspx?familyid=A362781C-3870-43BE-8926-862B40AA0CD0&displaylang=en
        • Or http://tinyurl.com/ozsgr
    12. Resources
      • DevPartner Studio Professional
        • Includes a memory profiler
        • http://www.compuware.com/products/devpartner/studio.htm
    13. Resources
      • Introduction to the CLR Profiler
        • http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20050217CLRPS/manifest.xml
      • Profiling Managed Code with the CLR Profiler
        • http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030729clrgn/manifest.xml
      • How To: Use CLR Profiler
        • http://msdn2.microsoft.com/en-us/library/ms979205.aspx
      • CLR Profiler (v1.1)
        • http://www.microsoft.com/downloads/details.aspx?familyid=86ce6052-d7f4-4aeb-9b7a-94635beebdda&displaylang=en
    14. Resources
      • Improving Managed Code Performance (P&P)
        • http://msdn2.microsoft.com/en-us/library/ms998547.aspx
      • Code Review: .NET Application Performance
        • http://msdn2.microsoft.com/en-us/library/ms998574.aspx
      • Checklist: Managed Code Performance
        • http://msdn2.microsoft.com/en-us/library/ms979052.aspx
      • Improving .NET Application Performance and Scalability (full Patterns and Practices book)
        • http://msdn2.microsoft.com/en-us/library/ms998530.aspx
    15. Resources
      • Rico Mariani's Performance Tidbits (Blog)
        • http://blogs.msdn.com/ricom/default.aspx
      • Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework (Jeffery Richter)
        • http://msdn.microsoft.com/msdnmag/issues/1100/gci/
      • Garbage Collector Basics and Performance Hints (Rico Mariani)
        • http://msdn2.microsoft.com/en-us/library/ms973837.aspx
    16. Thank You!
      • Questions?
    SlideShare Zeitgeist 2009

    + Greg SohlGreg Sohl Nominate

    custom

    1014 views, 0 favs, 0 embeds more stats

    Throughout my development career I've made use of g more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1014
      • 1014 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories