About Me: Brent Ozar. Perfmon and Profiler 101



Similar documents
One of the database administrators

SOLIDWORKS Enterprise PDM - Troubleshooting Tools

The 5-minute SQL Server Health Check

Performance Monitoring with Dynamic Management Views

Performance data collection and analysis process

Perfmon counters for Enterprise MOSS

Cognos Performance Troubleshooting

HP LeftHand SAN Solutions

MS SQL Server 2000 Data Collector. Status: 12/8/2008

Virtualisa)on* and SAN Basics for DBAs. *See, I used the S instead of the zed. I m pretty smart for a foreigner.

Deployment Planning Guide

Guerrilla Warfare? Guerrilla Tactics - Performance Testing MS SQL Server Applications

Dynamic Management Views: Available on SQL Server 2005 and above, using TSQL queries these views can provide a wide variety of information.

Response Time Analysis

SQL diagnostic manager Management Pack for Microsoft System Center. Overview

ProSystem fx Engagement. Deployment Planning Guide

PERFORMANCE TUNING IN MICROSOFT SQL SERVER DBMS

Storage and SQL Server capacity planning and configuration (SharePoint...

Best Practices for Deploying SSDs in a Microsoft SQL Server 2008 OLTP Environment with Dell EqualLogic PS-Series Arrays

ONSITE TRAINING CATALOG

Preparing a SQL Server for EmpowerID installation

System Requirements for Microsoft Dynamics GP 2015

MS SQL Server 2005 Data Collector. Status: 12/5/2008

DBA 101: Best Practices All DBAs Should Follow

Destiny performance monitoring white paper

Tuning Tableau Server for High Performance

Squeezing The Most Performance from your VMware-based SQL Server

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

System Requirements Table of contents

Perfmon Collection Setup Instructions for Windows Server 2008+

Users are Complaining that the System is Slow What Should I Do Now? Part 1

Load Testing Analysis Services Gerhard Brückl

Response Time Analysis

The Complete Performance Solution for Microsoft SQL Server

SAGE 500 PRODUCT ROADMAP

Mind Q Systems Private Limited

my forecasted needs. The constraint of asymmetrical processing was offset two ways. The first was by configuring the SAN and all hosts to utilize

Windows Server Performance Monitoring

Kaseya Performance And Best Practices Guide

Sawmill Log Analyzer Best Practices!! Page 1 of 6. Sawmill Log Analyzer Best Practices

SQL Server 2012 Database Administration With AlwaysOn & Clustering Techniques

Chapter 15: AppInsight for SQL

SQL Server Performance Tuning and Optimization

Performance Counters. Microsoft SQL. Technical Data Sheet. Overview:

Transitioning from a Physical to Virtual Production Environment. Ryan Miller Middle Tennessee Electric Membership Corp

Performance Tuning and Optimizing SQL Databases 2016

Optimising SQL Server CPU performance

Web Server (Step 1) Processes request and sends query to SQL server via ADO/OLEDB. Web Server (Step 2) Creates HTML page dynamically from record set

Enhancing SQL Server Performance

Managing Orion Performance

MONyog White Paper. Webyog

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

Predicting Change Outcomes Leveraging SQL Server Profiler

Database Maintenance Essentials

Response Time Analysis

VMware vcenter 4.0 Database Performance for Microsoft SQL Server 2008

Hardware Performance Optimization and Tuning. Presenter: Tom Arakelian Assistant: Guy Ingalls

Azure VM Performance Considerations Running SQL Server

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

SQL Server Performance Tuning for DBAs

Boost your VDI Confidence with Monitoring and Load Testing

Oracle Database 12c: Performance Management and Tuning NEW

Tech Tip: Understanding Server Memory Counters

System Requirements for Microsoft Dynamics GP 2013

SQL Server Version. Supported for SC2012 RTM*** Not supported for SC2012 SP1*** SQL Server 2008 SP1, SP2, SP3

MS SQL Performance (Tuning) Best Practices:

Sitecore Health. Christopher Wojciech. netzkern AG. Sitecore User Group Conference 2015

SharePoint Data Management and Scalability on Microsoft SQL Server

DBMS / Business Intelligence, Business Intelligence / DBMS

MOC Administering Microsoft SQL Server 2014 Databases

Terminal Server Software and Hardware Requirements. Terminal Server. Software and Hardware Requirements. Datacolor Match Pigment Datacolor Tools

Query Performance Tuning: Start to Finish. Grant Fritchey

Laserfiche Hardware Planning and Specifications. White Paper

Configuration best practices for Microsoft SQL Server 2005 with HP StorageWorks Enterprise Virtual Array 4000 and HP blade servers white paper

Default Thresholds. Performance Advisor. Adaikkappan Arumugam, Nagendra Krishnappa

Performance And Scalability In Oracle9i And SQL Server 2000

Capacity Analysis Techniques Applied to VMware VMs (aka When is a Server not really a Server?)

Technology Partners. Acceleratio Ltd. is a software development company based in Zagreb, Croatia, founded in 2009.

Hardware/Software Guidelines

Solving Performance Problems In SQL Server by Michal Tinthofer

SQL Server 2012 Query. Performance Tuning. Grant Fritchey. Apress*

Course 20462C: Administering Microsoft SQL Server Databases

MCTS Guide to Microsoft Windows 7. Chapter 10 Performance Tuning

Best Practices Every SQL Server DBA Must Know

WINDOWS SERVER MONITORING

1 Data Center Infrastructure Remote Monitoring

Monitoring Agent for PostgreSQL Fix Pack 10. Reference IBM

SQL Server Upgrading to. and Beyond ABSTRACT: By Andy McDermid

Administering Microsoft SQL Server Databases

Distribution One Server Requirements

Microsoft SQL Database Administrator Certification

Seradex White Paper. Focus on these points for optimizing the performance of a Seradex ERP SQL database:

AE EHR Database Servers

McAfee Enterprise Mobility Management Performance and Scalability Guide

Transcription:

Perfmon and Profiler 101 2008 Quest Software, Inc. ALL RIGHTS RESERVED. About Me: Brent Ozar SQL Server Expert for Quest Software Former SQL DBA Managed >80tb SAN, VMware Dot-com-crash experience Specializes in performance tuning 1

Today s Agenda The Honda Civic and the Nissan GT-R Metrics, Trace, Mitigations A New Secret Weapon Resources and Q&A If You Don t Need to Go Fast From http://flickr.com/photos/stevekeys/2755142278/ 2

But The Faster You Want To Go The More You Have To Measure 3

Windows Check Engine Light And If You Wanna Go Fast: 4

Two Approaches to Detection Exceptions Monitoring: Check Engine Proactive Monitoring: Detailed Gauges Where Do We Start? Hardware Windows SQL Server Tables, Indexes Query 5

Capture Metrics With Perfmon Performance Monitor, aka Perfmon Ships with all Windows versions Polls any server from your desktop Pulls performance metrics Writes them to a file Requires some OS permissions Does not include alerts or analytics 11 6

Memory Counters Memory Available Mbytes Paging File - % Usage SQLServer:Buffer Manager Buffer cache hit ratio Page life expectancy SQLServer:Memory Manager Memory Grants Pending 7

Storage Metrics: Physical Disk % Disk Time Avg. Disk Queue Length Avg. Disk sec/read Avg. Disk sec/write Disk Reads/sec Disk Writes/sec CPU Metrics Processor - % Processor Time System Processor Queue Length SQLServer:General Statistics User Connections (not CPU, just other ) 8

The Raw Output: CSV Files 16 Adding Analytical Formulas 17 9

That s a Lot of Zeroes! 18 Sorting High to Low 19 10

What To Look For, In Order System Processor Queue Length Memory Available Mbytes Lock pages in memory! What To Look For Next Disk metrics on the page file drive Disk metrics on the log file drive Disk metrics on the data file drive Disk metrics on the TempDB drive 11

Got Everything on One Drive? Narrow it down with the DMV sys.dm_io_virtual_file_stats _ What If We Could Data Mine It? 12

Table Analysis Tools For The Cloud Detecting Categories of Load 13

Capture Queries with a Trace Columns to Capture What s Going On What The Impact Was Text Data CPU DatabaseID and/or Reads DatabaseName Writes Login Name Duration Host Name Start Time Application Name End Time 14

Profiler s Results: A Trace Table Order By Duration Descending 15

Casting and Grouping Another Cloud Analytics Candidate 16

Another Way: Perf Dashboard Correlate Metrics & Trace Show a cause and effect relationship Fields to mentally join on: Date/Time ranges CPU Reads/Writes Duration 17

Sample Problem #1 Metrics tell us: Very high disk queue lengths on data drive Trace tells us: Report queries doing table scans w/o indexes Many scheduled reports run simultaneously l Ways We Can Mitigate It Add covering indexes Modify existing indexes Run reports serially, not all at once Add hard drives to the data file array Add memory to cache scanned tables 18

Sample Problem #2 Metrics tell us: Page file drive queue lengths average >20 Page file use averages >1% Available memory averages <200mb Buffer cache hit ratio and page life expectancy are high Trace tells us: No unusual queries Memory Configuration Server: 4gb ram OS: 1gb SQL: 3gb App: 1gb 19

Ways We Can Mitigate It Add memory and enable AWE/PAE Add memory and upgrade to 64-bit Reduce SQL s min/max memory sizes Move the app to its own server Sample Problem #3 Metric looks OK, but every 15 minutes: Long drive queues on the log file drive Page life expectancy drops near zero Network traffic jumps Trace tells us: Transaction log backups are running 20

Ways We Can Mitigate It Stop doing log backups Put the databases in simple mode Add drives to the transaction log array Throttle the transaction log backups Sample Problem #4 Metrics tell us: CPU average is high Disk, memory look OK Trace tells us: Queries are using cursors Operating on individual records, not sets 21

How We Can Mitigate It Change cursor to set-based query Buy really fast processors Spend a lot on licensing Wrapping Things Up Double-check the event log first Don t get overwhelmed: focus with the Metric Trace Mitigation process Show a clear cause and effect Use cloud-based BI to get an edge 22

Resources On The Web My posts about Perfmon and analytics: www.brentozar.com/perfmon www.brentozar.com/perfmoncloud Excel Table Analysis Tools for the Cloud: www.sqlserverdatamining.com/cloud SQL Server community: SQLServerPedia.com 23