Analyzing App Performance With PerfView
Late last year, Vance Morrison, who is currently an architect on the .NET Framework Performance team, released PerfView, which is a new performance tool for .NET developers. PerfView helps you discover and investigate performance hotspots in .NET Framework apps, and enables you to deliver consistently high-performance apps to your customers.
Using PerfView, you can perform complex CPU performance analyses to solve hard-to-detect performance problems. PerfView's revolutionary grouping and folding features are what makes it possible to grasp and solve these difficult problems.
Vance took some time to tell us more about PerfView in the following Channel 9 video. He explains why he built PerfView and how it works, and demonstrates its use.How can I get PerfView?
You can download PerfView from the Microsoft Download Center. It is a very quick, easy and free installation. It's just an EXE in a .zip file. You can also check out our series of PerfView Tutorial videos on Channel 9.What can PerfView do for you?
PerfView was designed to collect and analyze both CPU and memory scenarios. It provides the following features:
- CPU investigation:
- Enables you to diagnose the cause of excessive CPU use:
- GC Stats view for understanding the garbage collection costs in your app.
- JIT Stats view for understanding the JIT costs in your app.
- Provides aggregate call stacks of your app over time.
- Helps you quickly sort through all the stack data collected, to find the root cause of a performance issue.
- Managed memory investigations:
- Enables you to diagnose the cause of excessive memory use.
- Provides snapshots of the .NET Framework garbage collection (GC) heap, including large heaps.
- GC samples are displayed in the same stack viewer used for stack traces, enabling the same approach to be used to investigate memory use issues.
- Blocked time investigations:
- Enables you to diagnose latency issues in your app (for example, waiting on the network).
- Provides visualizations that show why your program is waiting.
PerfView provides access to rich performance data through a set of powerful views. Don’t be surprised if you find the tool a little complex at first. You will likely find the Performance Profiler in Visual Studio 2012 easier to use. It's up to you when to use either tool. We think PerfView is a great tool to use when you need to get a bird’s eye view of what’s really going on in your app.Let's take a look
- Home screen
- PerfView trace collection
- PerfView analysis type selector
- PerfView process selection window
- Stack viewer
- GC heap dump viewer
- Using Perfview to investigate performance hotspots
- Investigation 1: Analyzing a simple, contrived app
- Investigation 2: Making PerfView faster
Please download PerfView and give it a try...."
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)