Defrag Tools #115 - PerfView Part 3

Play Defrag Tools #115 - PerfView Part 3
Sign in to queue


In this episode of Defrag Tools, Vance Morrison joins Andrew Richards and Chad Beeder to discuss his performance analysis tool, PerfView. In part 3 of this series, we focus on looking at memory issues.

Download PerfView from Microsoft Download Center
PerfView Tutorial on Channel 9

[00:00] - Downloading and Installing PerfView
[00:58] - Strategy: collect multiple snapshots to identify memory allocation changes
[02:30] - A sample app with some common memory leaks
[03:45] - Questions about garbage collection and managed vs. unmanaged memory leaks
[04:53] - Demo: Collecting first heap snapshot with PerfView
[07:52] - Looking at the collected heap stacks
[12:00] - Collecting a second heap snapshot for comparison after using the app
[13:30] - Getting PerfView to show you the differences between two snapshots
[18:06] - Drilling into the details - what is this memory allocation, and what is keeping it alive?
[21:22] - What this leak looks like in the source code (something cached and never thrown away)
[23:17] - We capured a second leak too
[24:20] - What's the second leak? (registered a callback when a GUI event happens, took a global unmanaged reference, never deregistered it)
[27:48] - Email us your issues at Next week: Viewing exceptions in PerfView.



The Discussion

  • User profile image

    Does PerfView need full dumps for that? I've been trying to diagnose an alleged memory leak (it could as well just mean we have to scale it out) in a process who's baseline is 5GB memory usage. The "leak" manifests itself by the fact that after some time (it's a w3wp.exe, which is recycled automatically at 2pm, so it's less than 24 hours of running) the CPU spends more and more time in GC and there is quite a bit of paging (hard faults in resmon). Through perfmon counters, I've noticed that most of memory usage increase is in large object heap.

    My question is: will PerfView need to take the snapshot for over 2 minutes just like procdump's full memory dump deos in this case?

  • User profile image

    @siodmy: it's not an answer for your question but may help. Consider using -r parameter for procdump to create memory dump using process reflection (or cloning, available since Windows 7) - very helpful for 24/7 processes that use lots of memory. Have a look:

  • User profile image

    Subtitles transcripted CCW as "COM COBOL Wrapper". It took some time to figure out what is going on here :-)

Add Your 2 Cents