SlideShare a Scribd company logo
1 of 53
Perfmon and Profiler 101
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
Today’s Agenda The Civic & Godzilla Metrics, Trace, Mitigations Taking Before and After Pictures Helpful Tools Sample Scenarios Resources and Q&A
If You Don’t Need to Go Fast… Photo Licensed With Creative Commons From http://flickr.com/photos/stevekeys/2755142278/
But The Faster You Want To Go
The More You Have To Measure
Windows “Check Engine” Light
And If You Wanna Go Fast:
Two Approaches to Detection Exceptions Monitoring:  Check Engine Light Reactive Actions Proactive Monitoring:  Detailed Gauges Preventative Actions
Metrics-Trace-Mitigation Process
Where Do We Start?
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
12
Memory Counters Memory – Available Mbytes Paging File - % Usage SQLServer:Buffer Manager –  Buffer cache hit ratio Page life expectancy SQLServer:Memory Manager – Memory Grants Pending
Storage Metrics: Physical Disk Avg. Disk Queue Length Avg. Disk sec/Read Avg. Disk sec/Write Disk Reads/sec Disk Writes/sec % Disk Time
CPU & Other Metrics Processor - % Processor Time System – Processor Queue Length SQLServer:General Statistics – User Connections
16 The Raw Output: CSV Files
17 Adding Analytical Formulas
18 That’s a Lot of Zeroes!
19 Sorting High to Low
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
Got Everything on One Drive? Narrow it down with the DMV sys.dm_io_virtual_file_stats
Capture Queries with a Trace
Columns to Capture What’s Going On Text Data DatabaseID and/or DatabaseName Login Name Host Name Application Name What The Impact Was CPU Reads Writes Duration Start Time End Time
Profiler’s Results: A Trace Table
Order By Duration Descending
Casting and Grouping
Correlate Metrics & Trace Show a cause and effect relationship Fields to mentally “join” on: Date/Time ranges CPU Reads/Writes Duration
Metrics-Trace-Mitigation Process
If Our Servers Were Houses… Before After
Consistent and Repeatable 100 users accessing the web site Closing a typical financial period 10 users running a report Importing 100,000 records for a nightly ETL process Think scripts, think load generation tool Capture statistics during test run
When To Take A Picture Before Adding new hardware Installing a SQL Server service pack Changing storage configurations New application versions Every quarter After
Plus Monitoring For… Before Things break Populations change over time Budgeting Need to enforce standards We’re not the only ones working on the house After
Save Perfmon & Profiler Data Central file share Even better: in a database Name by server, by date Revisit every budget season Use for new hire training
Tool: Performance Dashboard
Tool: Data Mining
Table Analysis Tools For The Cloud
Detect Categories of Load
Works for Profiler Results Too
Tool: ClearTrace
Cleans Up Queries
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
Ways We Can Mitigate It Add covering indexes Modify existing indexes Add hard drives to the data file array Add memory to cache scanned tables Run reports serially, not all at once
Sample Problem #2 Metrics tell us: Page file drive queue lengths average >20 Page file use averages >1% Available memory averages less than 250mb Trace tells us: No unusual queries
Memory Configuration
Ways We Can Mitigate It Add memory and enable AWE/PAE Add memory and upgrade to 64-bit Move the app to its own server Reduce SQL’s min/max memory sizes
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
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
How We Can Mitigate It Buy really fast processors Spend a lot on licensing Change cursor to set-based query
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 pro tools to get an edge
Resources On The Web My blog about Perfmon:www.BrentOzar.com/perfmon Excel Table Analysis Tools for the Cloud:www.SQLServerDataMining.com/cloud ClearTrace: http://www.cleardata.biz/cleartrace/ SQL Server community:SQLServerPedia.com

More Related Content

What's hot

SharePoint Troubleshooting
SharePoint TroubleshootingSharePoint Troubleshooting
SharePoint TroubleshootingToby McGrail
 
Puppet Camp Melbourne: Keynote
Puppet Camp Melbourne: KeynotePuppet Camp Melbourne: Keynote
Puppet Camp Melbourne: KeynotePuppet
 
Achieving Zero Downtime for SQL
Achieving Zero Downtime for SQLAchieving Zero Downtime for SQL
Achieving Zero Downtime for SQLScaleArc
 
Puppet Camp Atlanta 2014: Keynote
Puppet Camp Atlanta 2014: Keynote  Puppet Camp Atlanta 2014: Keynote
Puppet Camp Atlanta 2014: Keynote Puppet
 
Boost your computer performance
Boost your computer performanceBoost your computer performance
Boost your computer performanceStacey Meyers
 
Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016ScaleArc
 
Elasticsearch at AffiliateWindow
Elasticsearch at AffiliateWindowElasticsearch at AffiliateWindow
Elasticsearch at AffiliateWindowYann Cluchey
 
Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling Mark Myers
 

What's hot (9)

SharePoint Troubleshooting
SharePoint TroubleshootingSharePoint Troubleshooting
SharePoint Troubleshooting
 
Puppet Camp Melbourne: Keynote
Puppet Camp Melbourne: KeynotePuppet Camp Melbourne: Keynote
Puppet Camp Melbourne: Keynote
 
Achieving Zero Downtime for SQL
Achieving Zero Downtime for SQLAchieving Zero Downtime for SQL
Achieving Zero Downtime for SQL
 
Puppet Camp Atlanta 2014: Keynote
Puppet Camp Atlanta 2014: Keynote  Puppet Camp Atlanta 2014: Keynote
Puppet Camp Atlanta 2014: Keynote
 
Boost your computer performance
Boost your computer performanceBoost your computer performance
Boost your computer performance
 
Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016Top 5 Challenges to Upgrading to SQL Server 2016
Top 5 Challenges to Upgrading to SQL Server 2016
 
Elasticsearch at AffiliateWindow
Elasticsearch at AffiliateWindowElasticsearch at AffiliateWindow
Elasticsearch at AffiliateWindow
 
Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling Vertical vs Horizontal Scaling
Vertical vs Horizontal Scaling
 
Going Serverless on AWS
Going Serverless on AWSGoing Serverless on AWS
Going Serverless on AWS
 

Viewers also liked

Aioug sangam13 v3
Aioug sangam13 v3Aioug sangam13 v3
Aioug sangam13 v3pasalapudi
 
3 12-2013 performance-testing_service_virtualization
3 12-2013 performance-testing_service_virtualization3 12-2013 performance-testing_service_virtualization
3 12-2013 performance-testing_service_virtualizationsilviasiqueirahp
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intropasalapudi
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle ArchitectureNeeraj Singh
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overviewhonglee71
 

Viewers also liked (7)

Aioug sangam13 v3
Aioug sangam13 v3Aioug sangam13 v3
Aioug sangam13 v3
 
Ip os
Ip osIp os
Ip os
 
3 12-2013 performance-testing_service_virtualization
3 12-2013 performance-testing_service_virtualization3 12-2013 performance-testing_service_virtualization
3 12-2013 performance-testing_service_virtualization
 
UKOUG
UKOUG UKOUG
UKOUG
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overview
 

Similar to Perfmon And Profiler 101

7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoringRed Gate Software
 
Perfmon And Profiler 101
Perfmon And Profiler 101Perfmon And Profiler 101
Perfmon And Profiler 101Quest Software
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance TuningBala Subra
 
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...Extra Technology
 
Understanding System Performance
Understanding System PerformanceUnderstanding System Performance
Understanding System PerformanceTeradata
 
2010/09 - Database Architechs - Performance & Tuning Tool
2010/09 - Database Architechs - Performance & Tuning Tool2010/09 - Database Architechs - Performance & Tuning Tool
2010/09 - Database Architechs - Performance & Tuning ToolDatabase Architechs
 
SQL Server and System Center Advisor
SQL Server and System Center AdvisorSQL Server and System Center Advisor
SQL Server and System Center AdvisorEduardo Castro
 
T3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of ExcellenceT3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of Excellenceveehikle
 
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksPerformance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksThoughtworks
 
Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...
 Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ... Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...
Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...Contribyte
 
Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...
Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...
Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...rschuppe
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availabilityPeter Gfader
 
NoCOUG Presentation on Oracle RAT
NoCOUG Presentation on Oracle RATNoCOUG Presentation on Oracle RAT
NoCOUG Presentation on Oracle RATHenryBowers
 
Upgrade to 2008 Best of PASS
Upgrade to 2008 Best of PASSUpgrade to 2008 Best of PASS
Upgrade to 2008 Best of PASSsqlserver.co.il
 
Database Performance Tuning| Rahul Gulab Singh
Database Performance Tuning| Rahul Gulab SinghDatabase Performance Tuning| Rahul Gulab Singh
Database Performance Tuning| Rahul Gulab SinghRahul Singh
 
EnCase Enterprise Basic File Collection
EnCase Enterprise Basic File Collection EnCase Enterprise Basic File Collection
EnCase Enterprise Basic File Collection Damir Delija
 
Performance Optimization
Performance OptimizationPerformance Optimization
Performance OptimizationNeha Thakur
 
Failure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archiveFailure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archiveDavin Abraham
 
Orion Network Performance Monitor (NPM) Optimization and Tuning Training
Orion Network Performance Monitor (NPM) Optimization and Tuning TrainingOrion Network Performance Monitor (NPM) Optimization and Tuning Training
Orion Network Performance Monitor (NPM) Optimization and Tuning TrainingSolarWinds
 
2010/10 - Database Architechs - Perf. & Tuning Tools
2010/10 - Database Architechs - Perf. & Tuning Tools2010/10 - Database Architechs - Perf. & Tuning Tools
2010/10 - Database Architechs - Perf. & Tuning ToolsDatabase Architechs
 

Similar to Perfmon And Profiler 101 (20)

7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring
 
Perfmon And Profiler 101
Perfmon And Profiler 101Perfmon And Profiler 101
Perfmon And Profiler 101
 
Sql Server Performance Tuning
Sql Server Performance TuningSql Server Performance Tuning
Sql Server Performance Tuning
 
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
WATS 2014 WA Agents Overview - CA Workload Automation Technology Summit (WATS...
 
Understanding System Performance
Understanding System PerformanceUnderstanding System Performance
Understanding System Performance
 
2010/09 - Database Architechs - Performance & Tuning Tool
2010/09 - Database Architechs - Performance & Tuning Tool2010/09 - Database Architechs - Performance & Tuning Tool
2010/09 - Database Architechs - Performance & Tuning Tool
 
SQL Server and System Center Advisor
SQL Server and System Center AdvisorSQL Server and System Center Advisor
SQL Server and System Center Advisor
 
T3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of ExcellenceT3 Consortium's Performance Center of Excellence
T3 Consortium's Performance Center of Excellence
 
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorksPerformance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
Performance monitoring - Adoniram Mishra, Rupesh Dubey, ThoughtWorks
 
Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...
 Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ... Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...
Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...
 
Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...
Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...
Application Performance Troubleshooting 1x1 - Part 2 - Noch mehr Schweine und...
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
NoCOUG Presentation on Oracle RAT
NoCOUG Presentation on Oracle RATNoCOUG Presentation on Oracle RAT
NoCOUG Presentation on Oracle RAT
 
Upgrade to 2008 Best of PASS
Upgrade to 2008 Best of PASSUpgrade to 2008 Best of PASS
Upgrade to 2008 Best of PASS
 
Database Performance Tuning| Rahul Gulab Singh
Database Performance Tuning| Rahul Gulab SinghDatabase Performance Tuning| Rahul Gulab Singh
Database Performance Tuning| Rahul Gulab Singh
 
EnCase Enterprise Basic File Collection
EnCase Enterprise Basic File Collection EnCase Enterprise Basic File Collection
EnCase Enterprise Basic File Collection
 
Performance Optimization
Performance OptimizationPerformance Optimization
Performance Optimization
 
Failure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archiveFailure analysis buisness impact-backup-archive
Failure analysis buisness impact-backup-archive
 
Orion Network Performance Monitor (NPM) Optimization and Tuning Training
Orion Network Performance Monitor (NPM) Optimization and Tuning TrainingOrion Network Performance Monitor (NPM) Optimization and Tuning Training
Orion Network Performance Monitor (NPM) Optimization and Tuning Training
 
2010/10 - Database Architechs - Perf. & Tuning Tools
2010/10 - Database Architechs - Perf. & Tuning Tools2010/10 - Database Architechs - Perf. & Tuning Tools
2010/10 - Database Architechs - Perf. & Tuning Tools
 

More from Quest Software

Virtualization and SAN Basics for DBAs
Virtualization and SAN Basics for DBAsVirtualization and SAN Basics for DBAs
Virtualization and SAN Basics for DBAsQuest Software
 
Perfmon And Profiler 201
Perfmon And Profiler 201Perfmon And Profiler 201
Perfmon And Profiler 201Quest Software
 
Advanced Index Tuning for SQL Server
Advanced Index Tuning for SQL ServerAdvanced Index Tuning for SQL Server
Advanced Index Tuning for SQL ServerQuest Software
 
How To Write A SQL Server Performance Review
How To Write A SQL Server Performance ReviewHow To Write A SQL Server Performance Review
How To Write A SQL Server Performance ReviewQuest Software
 
Get Your Boss To Say Yes
Get Your Boss To Say YesGet Your Boss To Say Yes
Get Your Boss To Say YesQuest Software
 
Sql Server Service Broker In The Real World
Sql Server Service Broker In The Real WorldSql Server Service Broker In The Real World
Sql Server Service Broker In The Real WorldQuest Software
 

More from Quest Software (10)

Virtualization and SAN Basics for DBAs
Virtualization and SAN Basics for DBAsVirtualization and SAN Basics for DBAs
Virtualization and SAN Basics for DBAs
 
Perfmon And Profiler 201
Perfmon And Profiler 201Perfmon And Profiler 201
Perfmon And Profiler 201
 
Advanced Index Tuning for SQL Server
Advanced Index Tuning for SQL ServerAdvanced Index Tuning for SQL Server
Advanced Index Tuning for SQL Server
 
SQL Server On SANs
SQL Server On SANsSQL Server On SANs
SQL Server On SANs
 
Disaster Recovery 101
Disaster Recovery 101Disaster Recovery 101
Disaster Recovery 101
 
CMDB Basics
CMDB BasicsCMDB Basics
CMDB Basics
 
How To Write A SQL Server Performance Review
How To Write A SQL Server Performance ReviewHow To Write A SQL Server Performance Review
How To Write A SQL Server Performance Review
 
Get Your Boss To Say Yes
Get Your Boss To Say YesGet Your Boss To Say Yes
Get Your Boss To Say Yes
 
Sql Server Service Broker In The Real World
Sql Server Service Broker In The Real WorldSql Server Service Broker In The Real World
Sql Server Service Broker In The Real World
 
Advanced Index Tuning
Advanced Index TuningAdvanced Index Tuning
Advanced Index Tuning
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 

Perfmon And Profiler 101

  • 2. 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
  • 3. Today’s Agenda The Civic & Godzilla Metrics, Trace, Mitigations Taking Before and After Pictures Helpful Tools Sample Scenarios Resources and Q&A
  • 4. If You Don’t Need to Go Fast… Photo Licensed With Creative Commons From http://flickr.com/photos/stevekeys/2755142278/
  • 5. But The Faster You Want To Go
  • 6. The More You Have To Measure
  • 8. And If You Wanna Go Fast:
  • 9. Two Approaches to Detection Exceptions Monitoring: Check Engine Light Reactive Actions Proactive Monitoring: Detailed Gauges Preventative Actions
  • 11. Where Do We Start?
  • 12. 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
  • 13. 12
  • 14. Memory Counters Memory – Available Mbytes Paging File - % Usage SQLServer:Buffer Manager – Buffer cache hit ratio Page life expectancy SQLServer:Memory Manager – Memory Grants Pending
  • 15. Storage Metrics: Physical Disk Avg. Disk Queue Length Avg. Disk sec/Read Avg. Disk sec/Write Disk Reads/sec Disk Writes/sec % Disk Time
  • 16. CPU & Other Metrics Processor - % Processor Time System – Processor Queue Length SQLServer:General Statistics – User Connections
  • 17. 16 The Raw Output: CSV Files
  • 19. 18 That’s a Lot of Zeroes!
  • 20. 19 Sorting High to Low
  • 21. What To Look For, In Order System – Processor Queue Length Memory – Available Mbytes Lock pages in memory!
  • 22. 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
  • 23. Got Everything on One Drive? Narrow it down with the DMV sys.dm_io_virtual_file_stats
  • 25. Columns to Capture What’s Going On Text Data DatabaseID and/or DatabaseName Login Name Host Name Application Name What The Impact Was CPU Reads Writes Duration Start Time End Time
  • 26. Profiler’s Results: A Trace Table
  • 27. Order By Duration Descending
  • 29. Correlate Metrics & Trace Show a cause and effect relationship Fields to mentally “join” on: Date/Time ranges CPU Reads/Writes Duration
  • 31. If Our Servers Were Houses… Before After
  • 32. Consistent and Repeatable 100 users accessing the web site Closing a typical financial period 10 users running a report Importing 100,000 records for a nightly ETL process Think scripts, think load generation tool Capture statistics during test run
  • 33. When To Take A Picture Before Adding new hardware Installing a SQL Server service pack Changing storage configurations New application versions Every quarter After
  • 34. Plus Monitoring For… Before Things break Populations change over time Budgeting Need to enforce standards We’re not the only ones working on the house After
  • 35. Save Perfmon & Profiler Data Central file share Even better: in a database Name by server, by date Revisit every budget season Use for new hire training
  • 38. Table Analysis Tools For The Cloud
  • 40. Works for Profiler Results Too
  • 43. 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
  • 44. Ways We Can Mitigate It Add covering indexes Modify existing indexes Add hard drives to the data file array Add memory to cache scanned tables Run reports serially, not all at once
  • 45. Sample Problem #2 Metrics tell us: Page file drive queue lengths average >20 Page file use averages >1% Available memory averages less than 250mb Trace tells us: No unusual queries
  • 47. Ways We Can Mitigate It Add memory and enable AWE/PAE Add memory and upgrade to 64-bit Move the app to its own server Reduce SQL’s min/max memory sizes
  • 48. 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
  • 49. 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
  • 50. 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
  • 51. How We Can Mitigate It Buy really fast processors Spend a lot on licensing Change cursor to set-based query
  • 52. 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 pro tools to get an edge
  • 53. Resources On The Web My blog about Perfmon:www.BrentOzar.com/perfmon Excel Table Analysis Tools for the Cloud:www.SQLServerDataMining.com/cloud ClearTrace: http://www.cleardata.biz/cleartrace/ SQL Server community:SQLServerPedia.com