No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3

Slides:



Advertisements
Similar presentations
DAT 342 Advanced SQL Server Performance and Tuning Bren Newman Program Manager SQL Server Development Microsoft Corporation.
Advertisements

SQL Server Wait Statistics Capture, Report, Analyse Rob Risetto Principal Consultant with StrataDB
5 Common SQL Server Performance Issues Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net.
Utility Database Chris
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Kevin Kline, SQL Sentry Director of Engineering Services, Microsoft SQL Server MVP since 2003 Twitter, Facebook, KEKline.
Chris Testa-O’Neill EMC Consulting. Agenda Resource Governor Integrating Performance Monitor and Profiler Policy Based Management Performance Data Collector.
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
Denny Cherry Senior Database Administrator / Architect MVP, MCSA, MCDBA, MCTS, MCITP.
Kevin Kline, SQL Sentry Director of Engineering Services, Microsoft SQL Server MVP since 2003 Twitter, Facebook, KEKline.
Connect Learn Share Performance Optimization for Microsoft Dynamics CRM Presented by: Walter Grow Austin Jones.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
Performance Dash A free tool from Microsoft that provides some quick real time information about the status of your SQL Servers.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
DONE-08 Sizing and Performance Tuning N-Tier Applications Mike Furgal Performance Manager Progress Software
It Depends Database administration for developers.
SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.
ESRI User Conference 2004 ArcSDE. Some Nuggets Setup Performance Distribution Geodatabase History.
Interpreting DMV’s & practical uses Jannie Muller mullerjannie.wordpress.com.
Troubleshooting SQL Server Performance: Tips &Tools Amit Khandelwal.
Connect with life Praveen Srivatsa Founder and CEO – AstraSoft.NET Vinod Kumar Technology Evangelist – Databases and BI.
SQL Reporting Services Troubleshooting Tips Greg Celentano SQL Saturday Providence.
Diagnosing Performance with Wait Statistics Robert L Davis Principal Database
Troubleshoot Customer Performance Problems Like a Microsoft Engineer Tim Chapman Senior Field Engineer, Microsoft.
Dave LinkedIn
Response Time Analysis A Methodology Around SQL Server Wait Types Dean Richards.
SQL Server Deep Dive Denis Reznik Data Architect at Intapp.
C:\Users\> t An affair with SQL Server for nearly a decade Was part of SQL Escalation Services and Premier Field Engineering team.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
Using Correlated Tracing to Diagnose Query Level Performance What’s slowing down my app? Jerome Halmans Senior Software Development Engineer Microsoft.
Honest Bob’s Cube Processing Bob Duffy Database Architect.
This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information.
Session Name Pelin ATICI SQL Premier Field Engineer.
Hitting the SQL Server “Go Faster” Button Rob Douglas #509 | Brisbane 2016.
SQL Server Internals & Architecture Naomi Williams, SQL DBA LinkedIn
Memory-Optimized Tables Querying at the speed of light.
Top 10 DBA mistakes that affect the SQL Server performance
An introduction to Wait Statistics
Troubleshooting SQL Server high CPU usage
What Is a Latch? …and Why Do I Care? Eddie Wuerch, mcm
Query Performance Tuning: Start to Finish
Hitting the SQL Server “Go Faster” Button
SQL Server Monitoring Overview
Wait Stats and You.
Where to Start, What You Need
Microsoft Dumps Question Answer - Dumps4download
Root Cause Analysis with DMVs
Troubleshooting SQL Server Basics
SQLSaturday 393- May 16, Redmond, WA
Hitting the SQL Server “Go Faster” Button
Performance Tuning for Mere Mortals Part II
Proving Hardware Bottlenecks &
What Is a Latch? …and Why Do I Care? Eddie Wuerch, mcm
Performance Tuning for Mere Mortals Part II
The 5 Hidden Performance Gems
මොඩියුල විශ්ලේෂණය SQL Server Waits. Tables රැසක් එකට එකතු කිරීම.
Troubleshooting Techniques(*)
SQL Server Performance Tuning
Статистика ожиданий или как найти место "где болит"
Analyzing Performance Problems Using XEvents, DMVs & Query Store
Jean Joseph DBA/Developer
Using wait stats to determine why my server is slow
Inside the Database Engine
Developing Microsoft SQL Server Databases
Analyzing Performance Problems Using XEvents, DMVs & Query Store
Inside the Database Engine
Inside the Database Engine
Presentation transcript:

No more waiting

Sponsors

About me  Database Technology Specialist  MVP  Blogger  Author 3

Agenda  What are wait statistics?  How wait statistics are generated  Querying & analyzing wait statistics  Common wait statistics 4 |

What are wait statistics? 5 |

What are wait statistics?  When SQL Server executes a request but the resources are not available to complete the request a wait occurs  SQL Server records the time it has been waiting as wait time and what it has been waiting on as the wait type 6 |

What are wait statistics?  The wait time and wait type are logged at the instance level and are cumulative since last SQL Server start  The wait statistics will show you what your SQL Server instance is spending most of it’s time waiting on! 7 |

How wait statistics are generated 8 |

How wait statistics are generated  SQL Server uses schedulers to manage CPU time for threads  The number of schedulers = number of logical processors + 1 (DAC)  View schedulers using sys.dm_os_schedulers 9 |

How wait statistics are generated 10 |

How wait statistics are generated 11 | Waiter list Runnable queue Resource wait time Signal wait time

How wait statistics are generated 12 | CPU time + Signal wait time + Resource wait time Wait time Total execution time

Querying & analyzing wait statistics 13 |

Querying & analyzing wait statistics  2 DMV’s for wait statistics: - sys.dm_os_wait_stats - sys.dm_os_waiting_tasks  sys.dm_os_wait_stats cumulative wait times  Use sys.dm_os_waiting_tasks to find out what is waiting right now! 14 |

Querying & analyzing wait statistics  Some wait types will log additional information in sys.dm_os_waiting_tasks that will help you troubleshoot!  Others you can safely ignore like LAZYWRITER_SLEEP (your mileage may vary) 15 |

Querying & analyzing wait statistics  Sys.dm_os_wait_stats perfect way to capture wait statistics baselines!  Without a baseline there is no way of saying a specific wait time is too long! 16 |

Querying & analyzing wait statistics  Wait statistics baseline methodology 17 |

Querying & analyzing wait statistics  Use sys.dm_os_waiting_tasks to find out what is slowing you down right now  Compare the wait times to your baseline  Focus on large increases or decreases for the top n wait types  Don’t freak out! 18 |

Common wait statistics 19 |

Common wait statistics  CXPACKET  LCK_M_xx  PAGEIOLATCH_xx  OLEDB  THREADPOOL 20 |

Common wait statistics CXPACKET  CXPACKET waits always occur when you use parallelism (MDOP)  Investigate execution plans, tune MDOP cost threshold, check statistics  Don’t freak out and turn of parallelism! 21 |

Common wait statistics LCK_M_xx  LCK_M_xx waits occur when blocking is occuring  Check if there is a blocking bottleneck, break up large updates, change isolation level 22 |

Common wait statistics PAGEIOLATCH_xx  Latches are synchronization objects for buffer pages  PAGEIOLATCH_xx occurs when data is moved from disk to the buffer cache  Can indicate IO subsystem or memory issues, check indexes, statistics 23 |

Common wait statistics OLEDB  OLEDB occurs when SQL Server calls the Microsoft SQL Native Client OLE DB provider  Will also occur when you are using linked servers  DBCC commands will also generate OLEDB waits! 24 |

Common wait statistics THREADP L  THREADPOOL waits occur when there are no free worker threads available  Max nr. of worker threads (64bit): 4 CPU’s = ((CPU’s – 4) * 16) 25 |

Common wait statistics THREADP L  Can be caused by blocking, large query batches, increased number of user connections or large number of concurrent parallel plans  Check causes above before changing max worker threads!!! 26 |

Questions? 27 |

Please give feedback to us   Thank you!

Additional reading 29 |  SQL Server 2005 Waits and Queues Tom Davidson -  Paul Randal SQLskills.com blog  Microsoft MSDN sys.dm_os_wait_stats

Sponsors