Troubleshooting SQL Server Basics

Slides:



Advertisements
Similar presentations
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
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.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
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.
Troubleshooting SQL Server Enterprise Geodatabase Performance Issues
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
+ Administering Microsoft SQL Server 2012 Databases Implementing a Data Warehouse with Microsoft SQL Server = Querying Microsoft SQL.
Introducing the SQL Server 2008 Performance Data Collector by Brad McGehee August 20, 2008 Audio via phone conference (866) , the dial in code.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
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.
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
How to kill SQL Server Performance Håkan Winther.
Response Time Analysis A Methodology Around SQL Server Wait Types Dean Richards.
SQL Server Deep Dive Denis Reznik Data Architect at Intapp.
Scott Fallen Sales Engineer, SQL Sentry Blog: scottfallen.blogspot.com.
Ramesh Meyyappan SQL Server Performance Tuning Consultant & Trainer SQLWorkshops.comSQLWorkshops.com / SQLIO.comSQLIO.com.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
Improve query performance with the new SQL Server 2016 query store!! Michelle Gutzait Principal Consultant at
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
CSS Microsoft Korea. Data Collector Management Data Warehouse Performance and Configuration Reports Graphical Showplan Activity Monitor SQL Profiler Dynamic.
SQL Server Internals & Architecture Naomi Williams, SQL DBA LinkedIn
Monitoring Windows Server 2012
Top 10 DBA mistakes that affect the SQL Server performance
An introduction to Wait Statistics
What Is a Latch? …and Why Do I Care? Eddie Wuerch, mcm
Troubleshooting SQL Server high CPU usage
What Is a Latch? …and Why Do I Care? Eddie Wuerch, mcm
Flash Storage 101 Revolutionizing Databases
SQL Server Data Collector From Every Angle
Query Performance Tuning: Start to Finish
UFC #1433 In-Memory tables 2014 vs 2016
SQL Server Monitoring Overview
Performance Tuning 101: Parallelism
Wait Stats and You.
Software Architecture in Practice
Where to Start, What You Need
Microsoft Dumps Question Answer - Dumps4download
Root Cause Analysis with DMVs
Dynamics AX Performance
SQLSaturday 393- May 16, Redmond, WA
Getting To Know Your Indexes
SQL Server on Linux Troubleshooting tips and tricks
Performance Tuning for Mere Mortals Part II
Proving Hardware Bottlenecks &
What Is a Latch? …and Why Do I Care? Eddie Wuerch, mcm
Azure SQL Database - Managing your database on the cloud
Performance Tuning for Mere Mortals Part II
In Memory OLTP Not Just for OLTP.
මොඩියුල විශ්ලේෂණය SQL Server Waits. Tables රැසක් එකට එකතු කිරීම.
SQL Server Performance Tuning
Using Power Bi to troubleshoot SQL Server instances
Статистика ожиданий или как найти место "где болит"
Analyzing Performance Problems Using XEvents, DMVs & Query Store
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:

Troubleshooting SQL Server Basics

Luan Moreno M. Maciel Sr. Database Consultant at Pythian [BI Team] MCT | MCSE Data Platform & BI Microsoft MVP - SQL Server

Luan Moreno M. Maciel

Agenda Patterns Waits Concepts Analysis Step by Step

Analysis Step by Step Types? Where? Interpretation? Methodology?

Where? DMV’s (Dynamic Management Views) Performance Counters Execution Plan Analysis Custom-TSQL MDW Where? Tools

Types? Historical Live

Methodology? Symptom Root Cause Solution

Interpretation? Colect Correct Data Daily Snapshots of the Data Verify and Validate Data Understanding of the Data Collected Find Patterns Internet Tips Daily Snapshots of the Data Interpretation?

Process and Thread Process Contains Thread Thread – Unit of Execution

Worker Threads SQL Server use O.S Threads Threads = SO Thread of Pools - Requests

Parallelism Guarantee Parallelism? Multi-Processor Available Resource? Utilization of Multiple Threads Split to Win! Query Optimizer – Serial Plan or Parallel Plan Parallel Plan <> Execution in Parallel Guarantee Parallelism? Multi-Processor Available Resource? MaxDop Cost Threshold of Parallelism

Cost Threshold for Parallelism Parallelism Options MaxDop Cost Threshold for Parallelism MaxDop = 4 Thread 1 Thread 2 Thread 0 Thread 3 Thread 4

Thread Scheduling SQL Server Controls Threads Non-Preemptive Scheduling Processor = Scheduler

Components of the Scheduler Processor Waiter List Runnable Queue One Thread per Time Wait Statistics Resource Wait Waiting

SQL Server Schedulers 4 Physical Cores + Hyper-Threading Processor Waiter List Runnable Queue Processor Waiter List Runnable Queue Processor Waiter List Runnable Queue Processor Waiter List Runnable Queue Processor Waiter List Runnable Queue Processor Waiter List Runnable Queue Processor Waiter List Runnable Queue Processor Waiter List Runnable Queue

Demo 1 Schedulers

Thread States Processor Waiter List Runnable Queue SPID 88 - Running

SPID 88 – CX_PACKET (Suspended) Thread States Processor Waiter List Runnable Queue SPID 88 – CX_PACKET (Suspended)

Thread States Processor Waiter List Runnable Queue SPID 88 (Runnable),

Example Processor SPID 88 - Running Runnable Queue Waiter List SPID 97 – IO_COMPLETION SPID 13 – Runnable SPID 56 – PAGEIOLATCH_SH SPID 27 – Runnable SPID 43 – CX_PACKET

Example Processor SPID 88 - Running Runnable Queue Waiter List SPID 97 – IO_COMPLETION SPID 13 – Runnable SPID 56 – PAGEIOLATCH_SH SPID 27 – Runnable SPID 43 – Runnable

Example Processor Runnable Queue Waiter List SPID 88 - LATCH_EX SPID 13 – Runnable SPID 97 – IO_COMPLETION SPID 27 – Runnable SPID 56 – PAGEIOLATCH_SH SPID 43 – Runnable

Example Processor Runnable Queue Waiter List SPID 88 - LATCH_EX SPID 13 – Running SPID 88 - LATCH_EX SPID 27 – Runnable SPID 97 – IO_COMPLETION SPID 43 – Runnable SPID 56 – PAGEIOLATCH_SH

Demo 2 Thread States

Waits Waiting Unavailable Resource Tracked by SQL Server

Waits & Queues Methodology Waits and Queues Tom Davidson [2005] - SQLCAT Tracked on SQL Server Right Direction to Find Issue ! 2005 – Performance Dashboards 2008/2012 – MDW & EX

sys.dm_os_wait_stats sys.dm_os_waiting_tasks sys.dm_exec_requests Demo 3 sys.dm_os_wait_stats sys.dm_os_waiting_tasks sys.dm_exec_requests

Troubleshooting Patterns (Most Common) Paul S. Randal – Worldwide Survey bit.ly/fSWeO5 1.800 SQL Server Instances Top 3 – Detailed Anaylisis CX_PACKET ASSYNC_NETWORK_IO WRITELOG

CX_Packet Wait Type Parallel Plans Executing Adjust MaxDop = 1[Knee-Jerk] Verify Plans with Large Scan Operation Check Requests with CX_PACKET Wait Statistics Set MaxDop and Cost Threshold

PAGEIOLATCH_Wait Type Waiting Data Page to go to Buffer Pool SH – Read or EX - Changed I/O Issue = 1[Knee-Jerk] Check Disk Latency Examine Plans with CONVERT_IMPLICT NonClustered Index Creation Statistics Memory

ASSYNC_NETWORK_IO_Wait Type SQL Server Waits Ack Network Issue = 1[Knee-Jerk] Analyze Application Code Analyze Network RBAR Problem – Row By Agonizing Row – Row By Row Huge Table Scans

Hands On...... [DBA Curaçao Team] Production Server Hands On...... [DBA Curaçao Team]

Thank You....