+ All Categories
Home > Documents > .NET Debugging for the Production Environment

.NET Debugging for the Production Environment

Date post: 23-Feb-2016
Category:
Upload: israel
View: 52 times
Download: 0 times
Share this document with a friend
Description:
.NET Debugging for the Production Environment. Part 2: Using Perfmon to diagnose application issues. Brad Linscott. Premier Field Engineering. Understanding Perfmon Counters. Perfmon : high-level overview Objects, Counters, & Instances! Oh my! One approach to analyzing counters - PowerPoint PPT Presentation
13
.NET Debugging for the Production Environment Part 2: Using Perfmon to diagnose application issues Brad Linscott Premier Field Engineering
Transcript
Page 1: .NET Debugging for the Production Environment

.NET Debugging for the Production EnvironmentPart 2: Using Perfmon to diagnose application issues

Brad LinscottPremier Field Engineering

Page 2: .NET Debugging for the Production Environment

Understanding Perfmon CountersPerfmon: high-level overview

Objects, Counters, & Instances! Oh my!One approach to analyzing countersCounters for cpu issuesCounters for memory issuesCounters for ASP.Net issuesCounters for managed exceptions

2

Page 3: .NET Debugging for the Production Environment

3

Baked-in tool that monitors the OS and/or processes for a myriad of performance statistics.Also called Performance Monitor, System Monitor, and Sysmon (tip for searches).Poor at identifying root cause; excellent at defining the problem.Obtaining a problem definition: A key first step of troubleshooting!

Perfmon: High-level overview

Page 4: .NET Debugging for the Production Environment

4

Perfmon vs Task ManagerPerfmon provides more detailPerfmon provides trends

Perfmon: High-level overview (cont’d)

Page 5: .NET Debugging for the Production Environment

5

Perfmon data broken down into objects, counters, and sometimes instances.

Objects contain CountersCounters may/may not

contain instances.

Objects, Counters, & Instances! Oh, my!

WS03 andbelow

Vista andbeyond

Page 6: .NET Debugging for the Production Environment

6

An Object relates to a specific aspect of the OS, processes, or a technology – e.g., System, Process, ASP.Net Apps objects.Counters measure a specific metric – e.g.,

Amt. of memory in paged pool# handles opened by a given process

Instances exist if the Object allows for it:PagedPoolBytes counter covers entire computer; no Instances are possibleHandleCount counter can be measured by each process; an Instance is each process.exe.

Objects, Counters, & Instances, cont’d.

Page 7: .NET Debugging for the Production Environment

7

Problem definitions can be vague or specific; Perfmon can help support or oppose

Can be as vague as “app is broken”Can be as specific as “hung process due to msgbox thrown in response to unhandled exception”

If problem definition is vague, use Perfmon to formulate a specific oneIf problem definition is specific, use Perfmon to provide data which supports or opposes

One Approach to Perfmon Analysis

Page 8: .NET Debugging for the Production Environment

8

Great “handbook” for analyzing Perfmon counters to diagnose .NET performance issues:

ASP.NET Performance Monitoring, and When to Alert Administrators

http://msdn.microsoft.com/en-us/library/ms972959.aspx

One approach to Perfmon analysis (cont’d)

Page 9: .NET Debugging for the Production Environment

9

Process object%ProcessorTime counter – overall usage%PrivilegedTime counter – kernel usage%UserTime counter – user mode usage

Check %ProcessorTime first, then move onto the other countersNote trends (rising, falling, flatlining, spiking, etc.)

Counters for CPU issues

Page 10: .NET Debugging for the Production Environment

10

Process issues (e.g., VA space) vs system issues (e.g., pools, RAM)

Counters for memory issues

Process objectPrivate BytesVirtual BytesHandle Count

.NET CLR Memory object# Bytes in all HeapsGen 0, 1, 2 Heap Size– Gen0 counter

measures budget, not commit

LOH Size

Page 11: .NET Debugging for the Production Environment

11

Unmanaged Leak

Counters for memory issues, cont’dManaged “Leak”

White line: Private BytesBlue line: # Bytes in all Heaps

Page 12: .NET Debugging for the Production Environment

12

ASP.NET objectApplication RestartsRequests Queued

Process objectID Process

Counters for ASP.NET issues

For more information, seehttp://msdn.microsoft.com/en-us/library/ms998579.aspx#scalenetchapt15_topic12

ASP.NET Applications object

Request Execution TimeRequest Wait TimeRequests DisconnectedRequests ExecutingRequests FailedRequests In App QueueRequests SucceededRequests Timed OutRequests/sec

Page 13: .NET Debugging for the Production Environment

13

.NET CLR Exceptions object# Exceptions Thrown# Exceptions Thrown/sec

Counters for .NET Exceptions


Recommended