SlideShare a Scribd company logo
1 of 24
MONITORING SQL SERVER
Key Performance Metrics and how to Interpret Them
Tuning blog: http://www.sqlperformance.com/
E-mail ebooks@sqlsentry.com for free copies of our $10 e-books:
YOUR PRESENTER
• John Q Martin
o Sales Engineer for SQL Sentry
o Worked with SQL Server for ~10 years
o Consultant, SQL DBA, Dev & BI Developer
o Former Microsoft Premier Field Engineer
• Contact Information
o Email: Jmartin@SQLSentry.com
o Blog: http://blogs.sqlsentry.com/author/JohnMartin/
o Twitter: @SQLDiplomat
o LinkedIn: https://uk.linkedin.com/in/johnqmartin
AGENDA
• CPU Monitoring
• Memory Monitoring
• Storage Monitoring
• SQL Server Monitoring
o Monitoring Counters
o Wait Stats
o DMVs
o Events
MONITORING APPROACHES
MONITORING FUNDAMENTALS
• Monitor over time, keep the captured data as it will be invaluable
o Don’t just grab everything “just in case”
• Use historical data to create baselines
o Baselines will allow for spotting when regular events or time periods are ‘out of band’
• Historical monitoring data can be used to perform trend analysis and capacity
planning.
CPU METRICS
• Process
o % Processor Time
o % Privileged Time
• Processor
o % Processor Time
o % Privileged Time
o % DPC Time
CPU METRICS
• Important to monitor each CPU as well as the total CPU usage.
o Helps identify potential MAXDOP issues.
o Will allow for you to see if there are possible misconfigurations in the system outside of SQL
Server
• Excessive DPC and Privileged time can indicate issues elsewhere in the
system such as networking or storage.
• Monitoring the SQL Server Processes will allow you to see how much time is
spent on SQL Server
o Depending on storage you can capture more process instances
CPU METRICS
Real Time Monitoring Tracking CPU over time.
MEMORY METRICS
• NUMA Node Memory
o Available MBytes
o Total MBytes
• Memory
o Available Mbytes
o Page Faults/sec
o Page Reads/sec
o Page Writes/sec
MEMORY MONITORING
• Understand what volumes of data are being read into and out of memory.
• Tracking memory use by NUMA node can have benefits depending on the
configuration of the system.
o Differences in the amount of memory allocated to each NUMA node can affect processing in
the CPUs within each node.
• Ensuring that there is a sufficient free memory is important to maintaining a
stable system.
MEMORY MONITORING
• Track memory by node
• Aggregate to overall
• What else is in use?
Node 1Node 0
STORAGE METRICS
• Logical Disk
o Same as Physical Disk
o Depends on your disk
configuration, if 1:1
mapping between physical
& logical then use Physical
metrics.
• Physical Disk
o Disk Read Bytes/sec
o Disk Write Bytes/sec
o Disk Reads/sec
o Disk Writes/sec
o Split IO/sec
o Current Disk Queue Length
STORAGE MONITORING
• Key monitoring elements for storage
o IOPS
o Throughput
o Latency
• Monitor amount of space used
o Sample rate does not need to be frequent, can be minutes or hours rather than seconds.
• Understand the configuration of the disks as to whether you need to use
Logical and/or Physical Disk counters.
SQL SERVER STORAGE DMVS
• sys.dm_io_virtual_file_stats()
o Gives depth to the reads & writes into each database file
o Allows you to derive Read/Write balance for data files
o IO operations and Bytes written
• sys.sm_io_pending_io_requests
o Shows outstanding file IOs for SQL Server database files.
• sys.dm_db_index_physical_stats()
o Gather index fragmentation details
o Can cause lots of IO, use sparingly on large databases
SQL SERVER METRICS
• Buffer Manager
o Buffer Cache Hit Ratio
o Checkpoint pages/sec
o Page Reads/sec
o Page Writes/sec
• Access Methods
o Forwarded Records/sec
o FreeSpace Scans/sec
o Page Splits/sec
o Workfiles Created/sec
o Worktables Created/sec
SQL SERVER METRICS
• Buffer Node
o Page Life Expectancy
o Local node Page
lookups/sec
o Remote node page
lookups/sec
• Databases
o Active Transactions
o Log Bytes Flushed/sec
o Log Flush Wait time
o Log Flush Waits/sec
o Log Flushes/sec
o Percent Log Used
PAGE LIFE EXPECTANCY
• PLE Value is meaningless, Discuss.
• Value needs to be given context
o How large is the buffer pool
o What is my IO sub-system capability
o What % of the IO Channel is used to maintain the PLE value
• Investigate changes
o What happened when PLE suddenly dropped?
• Monitor at the Buffer Node Level
o Global PLE value will not equal mean AVG of Node value.
PAGE LIFE EXPECTANCY
• Look for changes and see what
else was going on
o Large batch job/report
o Someone runs DBCC DROPCLEANBUFFERS
• Frequent monitoring required as
changes can happen fast
o Seconds to minutes for monitoring interval.
What happened ?
SQL SERVER WAITS
• ASYNC_NETWORK_IO
• LCK_*
• PAGELATCH_*
• RESOURCE_SEMAPHOR
E
• WRITELOG
• LOGBUFFER
• CXPACKET
• THREADPOOL
SQL SERVER EVENTS
• Monitor SQL Agent for Failed Jobs
• Monitor for 823, 824, 825 errors
o Can indicate storage or corruption issues
o Make use of Agent Alerts or tools to scan the agent log
• Monitor and manage the dbo.suspect_pages table in MSDB
o SQL Server will track incidences of corrupt pages here
o Limited to 1000 records so needs to be managed if there is anything here
SUMMARY
• Identify base metrics that you should be capturing and a capture frequency
o Understand why you are collecting them and how to use them effectively
• Identify specific business events and cycles and create baselines to allow for
tracking performance over multiple iterations and time
• Look for correlation between performance metrics
o Make use of CORREL function in Excel if needed
• Track changes to the environment, code, applications etc. this will help
supplement the monitoring data.
QUESTIONS
THANK YOU!
• Slides will be available at http://blogs.sqlsentry.com
• More information at:
o SQLSkills, et al
• E-mail ebooks@sqlsentry.com for free copies of our e-books:
o Just tell them where you met me
• My contact info for other questions:
o Email: Jmartin@SQLSentry.com
o Twitter: @SQLDiplomat

More Related Content

Similar to Monitoring sql server

Managing Memory & Locks - Series 1 Memory Management
Managing  Memory & Locks - Series 1 Memory ManagementManaging  Memory & Locks - Series 1 Memory Management
Managing Memory & Locks - Series 1 Memory ManagementDAGEOP LTD
 
Sql server-performance-hafi
Sql server-performance-hafiSql server-performance-hafi
Sql server-performance-hafizabi-babi
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportAlfredo Krieg
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowDean Richards
 
SQL 2014 In-Memory OLTP
SQL 2014 In-Memory  OLTPSQL 2014 In-Memory  OLTP
SQL 2014 In-Memory OLTPAmber Keyse
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
SQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsSQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsJohn Martin
 
Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.John Martin
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsSteve Knutson
 
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...J.D. Wade
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryAntonios Chatzipavlis
 
Always On Availability Group Maintenance Operations
Always On Availability Group Maintenance OperationsAlways On Availability Group Maintenance Operations
Always On Availability Group Maintenance OperationsJohn Martin
 
AppSphere 15 - Is the database affecting your critical business transactions?
AppSphere 15 - Is the database affecting your critical business transactions?AppSphere 15 - Is the database affecting your critical business transactions?
AppSphere 15 - Is the database affecting your critical business transactions?AppDynamics
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesRichard Douglas
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity PlanningMongoDB
 
SharePoint Performance Monitoring with Sean P. McDonough
SharePoint Performance Monitoring with Sean P. McDonoughSharePoint Performance Monitoring with Sean P. McDonough
SharePoint Performance Monitoring with Sean P. McDonoughGabrijela Orsag
 

Similar to Monitoring sql server (20)

Monitor database essentials with Applications Manager
Monitor database essentials with Applications ManagerMonitor database essentials with Applications Manager
Monitor database essentials with Applications Manager
 
Managing Memory & Locks - Series 1 Memory Management
Managing  Memory & Locks - Series 1 Memory ManagementManaging  Memory & Locks - Series 1 Memory Management
Managing Memory & Locks - Series 1 Memory Management
 
Sql server-performance-hafi
Sql server-performance-hafiSql server-performance-hafi
Sql server-performance-hafi
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR Report
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should Know
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
 
SQL 2014 In-Memory OLTP
SQL 2014 In-Memory  OLTPSQL 2014 In-Memory  OLTP
SQL 2014 In-Memory OLTP
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
SQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsSQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and Enhancements
 
Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.
 
Breaking data
Breaking dataBreaking data
Breaking data
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAs
 
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to query
 
Always On Availability Group Maintenance Operations
Always On Availability Group Maintenance OperationsAlways On Availability Group Maintenance Operations
Always On Availability Group Maintenance Operations
 
Key to optimal end user experience
Key to optimal end user experienceKey to optimal end user experience
Key to optimal end user experience
 
AppSphere 15 - Is the database affecting your critical business transactions?
AppSphere 15 - Is the database affecting your critical business transactions?AppSphere 15 - Is the database affecting your critical business transactions?
AppSphere 15 - Is the database affecting your critical business transactions?
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock Holmes
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity Planning
 
SharePoint Performance Monitoring with Sean P. McDonough
SharePoint Performance Monitoring with Sean P. McDonoughSharePoint Performance Monitoring with Sean P. McDonough
SharePoint Performance Monitoring with Sean P. McDonough
 

More from John Martin

Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDBJohn Martin
 
Always On, Multi-Site Design Considerations
Always On, Multi-Site Design ConsiderationsAlways On, Multi-Site Design Considerations
Always On, Multi-Site Design ConsiderationsJohn Martin
 
Securing your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended PracticesSecuring your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended PracticesJohn Martin
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaSJohn Martin
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesJohn Martin
 
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014John Martin
 

More from John Martin (6)

Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDB
 
Always On, Multi-Site Design Considerations
Always On, Multi-Site Design ConsiderationsAlways On, Multi-Site Design Considerations
Always On, Multi-Site Design Considerations
 
Securing your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended PracticesSecuring your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended Practices
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: 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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: 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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 

Monitoring sql server

  • 1. MONITORING SQL SERVER Key Performance Metrics and how to Interpret Them
  • 2. Tuning blog: http://www.sqlperformance.com/ E-mail ebooks@sqlsentry.com for free copies of our $10 e-books:
  • 3. YOUR PRESENTER • John Q Martin o Sales Engineer for SQL Sentry o Worked with SQL Server for ~10 years o Consultant, SQL DBA, Dev & BI Developer o Former Microsoft Premier Field Engineer • Contact Information o Email: Jmartin@SQLSentry.com o Blog: http://blogs.sqlsentry.com/author/JohnMartin/ o Twitter: @SQLDiplomat o LinkedIn: https://uk.linkedin.com/in/johnqmartin
  • 4. AGENDA • CPU Monitoring • Memory Monitoring • Storage Monitoring • SQL Server Monitoring o Monitoring Counters o Wait Stats o DMVs o Events
  • 6. MONITORING FUNDAMENTALS • Monitor over time, keep the captured data as it will be invaluable o Don’t just grab everything “just in case” • Use historical data to create baselines o Baselines will allow for spotting when regular events or time periods are ‘out of band’ • Historical monitoring data can be used to perform trend analysis and capacity planning.
  • 7. CPU METRICS • Process o % Processor Time o % Privileged Time • Processor o % Processor Time o % Privileged Time o % DPC Time
  • 8. CPU METRICS • Important to monitor each CPU as well as the total CPU usage. o Helps identify potential MAXDOP issues. o Will allow for you to see if there are possible misconfigurations in the system outside of SQL Server • Excessive DPC and Privileged time can indicate issues elsewhere in the system such as networking or storage. • Monitoring the SQL Server Processes will allow you to see how much time is spent on SQL Server o Depending on storage you can capture more process instances
  • 9. CPU METRICS Real Time Monitoring Tracking CPU over time.
  • 10. MEMORY METRICS • NUMA Node Memory o Available MBytes o Total MBytes • Memory o Available Mbytes o Page Faults/sec o Page Reads/sec o Page Writes/sec
  • 11. MEMORY MONITORING • Understand what volumes of data are being read into and out of memory. • Tracking memory use by NUMA node can have benefits depending on the configuration of the system. o Differences in the amount of memory allocated to each NUMA node can affect processing in the CPUs within each node. • Ensuring that there is a sufficient free memory is important to maintaining a stable system.
  • 12. MEMORY MONITORING • Track memory by node • Aggregate to overall • What else is in use? Node 1Node 0
  • 13. STORAGE METRICS • Logical Disk o Same as Physical Disk o Depends on your disk configuration, if 1:1 mapping between physical & logical then use Physical metrics. • Physical Disk o Disk Read Bytes/sec o Disk Write Bytes/sec o Disk Reads/sec o Disk Writes/sec o Split IO/sec o Current Disk Queue Length
  • 14. STORAGE MONITORING • Key monitoring elements for storage o IOPS o Throughput o Latency • Monitor amount of space used o Sample rate does not need to be frequent, can be minutes or hours rather than seconds. • Understand the configuration of the disks as to whether you need to use Logical and/or Physical Disk counters.
  • 15. SQL SERVER STORAGE DMVS • sys.dm_io_virtual_file_stats() o Gives depth to the reads & writes into each database file o Allows you to derive Read/Write balance for data files o IO operations and Bytes written • sys.sm_io_pending_io_requests o Shows outstanding file IOs for SQL Server database files. • sys.dm_db_index_physical_stats() o Gather index fragmentation details o Can cause lots of IO, use sparingly on large databases
  • 16. SQL SERVER METRICS • Buffer Manager o Buffer Cache Hit Ratio o Checkpoint pages/sec o Page Reads/sec o Page Writes/sec • Access Methods o Forwarded Records/sec o FreeSpace Scans/sec o Page Splits/sec o Workfiles Created/sec o Worktables Created/sec
  • 17. SQL SERVER METRICS • Buffer Node o Page Life Expectancy o Local node Page lookups/sec o Remote node page lookups/sec • Databases o Active Transactions o Log Bytes Flushed/sec o Log Flush Wait time o Log Flush Waits/sec o Log Flushes/sec o Percent Log Used
  • 18. PAGE LIFE EXPECTANCY • PLE Value is meaningless, Discuss. • Value needs to be given context o How large is the buffer pool o What is my IO sub-system capability o What % of the IO Channel is used to maintain the PLE value • Investigate changes o What happened when PLE suddenly dropped? • Monitor at the Buffer Node Level o Global PLE value will not equal mean AVG of Node value.
  • 19. PAGE LIFE EXPECTANCY • Look for changes and see what else was going on o Large batch job/report o Someone runs DBCC DROPCLEANBUFFERS • Frequent monitoring required as changes can happen fast o Seconds to minutes for monitoring interval. What happened ?
  • 20. SQL SERVER WAITS • ASYNC_NETWORK_IO • LCK_* • PAGELATCH_* • RESOURCE_SEMAPHOR E • WRITELOG • LOGBUFFER • CXPACKET • THREADPOOL
  • 21. SQL SERVER EVENTS • Monitor SQL Agent for Failed Jobs • Monitor for 823, 824, 825 errors o Can indicate storage or corruption issues o Make use of Agent Alerts or tools to scan the agent log • Monitor and manage the dbo.suspect_pages table in MSDB o SQL Server will track incidences of corrupt pages here o Limited to 1000 records so needs to be managed if there is anything here
  • 22. SUMMARY • Identify base metrics that you should be capturing and a capture frequency o Understand why you are collecting them and how to use them effectively • Identify specific business events and cycles and create baselines to allow for tracking performance over multiple iterations and time • Look for correlation between performance metrics o Make use of CORREL function in Excel if needed • Track changes to the environment, code, applications etc. this will help supplement the monitoring data.
  • 24. THANK YOU! • Slides will be available at http://blogs.sqlsentry.com • More information at: o SQLSkills, et al • E-mail ebooks@sqlsentry.com for free copies of our e-books: o Just tell them where you met me • My contact info for other questions: o Email: Jmartin@SQLSentry.com o Twitter: @SQLDiplomat