.NET Zone is brought to you in partnership with:

I’ve been a Windows developer since 3.0 and caught the Visual Basic wave early with v1. I’ve released a “production” application in every version of VB since then (except VB for DOS). Focusing on enterprise, line-of-business development I’ve built Call Center Applications, Mortgage finance systems, Customer Relationship Management tools and more recently I’ve been in the Litigation Support/Electronic Data Discovery/Electronically Stored Information space. Greg is a DZone MVB and is not an employee of DZone and has posted 443 posts at DZone. You can read more from them at their website. View Full User Profile

Analyzing App Performance With PerfView

10.21.2012
| 4347 views |
  • submit to reddit

.NET Framework Blog - Improving Your App's 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.

PerfView can be used for any app on Windows, including ASP.NET and Windows Store apps. While it works great for .NET Framework apps, it can be used for native and JavaScript apps, too. It supports all .NET Framework versions, including the .NET Framework 4.5.

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
Closing

PerfView enables you to identify the performance hotspots in your app and enables you to quickly determine the code that needs to be updated to mitigate the hotspots. You can use PerfView to investigate .NET Framework (all versions), C++, or JavaScript apps. It also supports investigating performance issues in Windows Store apps.

Please download PerfView and give it a try...."

 

Related Past Post XRef:
Perfect Viewing of PerfView - Links, videos and more...
Gathering, viewing and understanding performance data with the new PerfView utility

"Under the Hood of .NET Memory Management" free eBook
.Net Memory Management Explained - Red Gate Story Book Style...

Published at DZone with permission of Greg Duncan, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)