SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

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