1 / 13

Leveraging Performance counters to build robust applications in .NET

Leveraging Performance counters to build robust applications in .NET. Chandrashekhar Chaudhari Technical Lead | Microsoft http://blogs.msdn.com/dsvc | chancha@microsoft.com. Key Take-aways …. Performance Monitor: What is it? Know the important .NET Performance counters

uriel
Télécharger la présentation

Leveraging Performance counters to build robust applications in .NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Leveraging Performance counters to build robust applications in .NET ChandrashekharChaudhari Technical Lead | Microsoft http://blogs.msdn.com/dsvc |chancha@microsoft.com

  2. Key Take-aways… • Performance Monitor: What is it? • Know the important .NET Performance counters • ASP.NET and Performance Monitor • A quick note on .NET Performance: • Bottlenecks • Possibilities • Way outs

  3. Perfmon: What is it? • The name says it all. • Used to monitor the performance parameters of the system and the user applications. • How to use it? • What are the parameters that we can track?

  4. A few .NET Performance Counters • .NET CLR Memory Counters • .NET CLR Exceptions • .NET CLR Loading • .NET CLR JIT • Processor • Memory

  5. Scenario I: Application Consuming lot of memory • What should I look at? • .NET CLR Memory Counters • Indicators: Memory Leak? • # bytes in all Heaps increasing • Gen 2 Heap Size increasing • # GC handles increasing • # total committed/Reserved Bytes increasing • % Time in GC • Indicators: Memory Fragmentation? • # total reserved Bytes significantly larger than # total committed Bytes • # of Pinned Objects increasing • # GC handles increasing • # bytes in all heaps always increasing.

  6. Scenario II: Application throwing lot of exceptions unnecessarily… • Cost of throwing an exception • What else can go wrong? • Blocking exception handlers • Loss of exception context • Perfmon Exception counters to look at: • # of Exceps Thrown • # of Exceps Thrown / Sec • # of Filters / Sec • Throw to Catch Depth / Sec

  7. Scenario III: Application Takes too long to Load • Possible Reasons: • Too many assemblies to load • Too much of jitting happening. • Perfmon counters to look at: • % Time in Loading • Current Assemblies • Rate of Assemblies/AppDomains • # of IL Bytes JITted • # of methods JITed • % time in JIT

  8. A Quick note on ASP.NET specific counters • Two types: • System Counters • Application Counters • Few important Counters: • ASP.NET/Application Restarts. • ASP.NET/Requests Queued • ASP.NET Application/Requests/sec • ASP.NET Application/Errors Total • AND many more…

  9. .NET Application Performance • Performance is a relative term: • What is good for you may not be good for others. • Performance Bottlenecks in .NET: • Am I loading too many assemblies at the start? • Am I doing too many memory operations? Am I trying to deal with the memory management on my own? • Am I misusing Exceptions and defeating their purpose? • The list is long…

  10. .NET Application Performance • Way outs: • Add trace messages in your application. • Debug it. • Use Debugging tools to do post mortem analysis. • Use Perfmon.

  11. Feedback / QnA • Your Feedback is Important! Please take a few moments to fill out our online feedback form • Use the Question Manager on LiveMeeting to ask your questions now!

  12. Contact (optional slide) • Blog Address www.blogs.msdn.com/dsvc • Email Address chancha@microsoft.com

More Related