Статистика ожиданий или как найти место "где болит"

Slides:



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

#RefreshCache Database Performance Tuning October 9-11, 2011 Tom Powers IT Applications Team Manager Southeast Christian Church Louisville, KY
The Architecture of Oracle
6 SQL Server Integration Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore.
SQL Server Wait Statistics Capture, Report, Analyse Rob Risetto Principal Consultant with StrataDB
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
Microsoft SQL Server Administration for SAP SQL Server Architecture.
Kevin Kline, SQL Sentry Director of Engineering Services, Microsoft SQL Server MVP since 2003 Twitter, Facebook, KEKline.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Managing Multi-User Databases AIMS 3710 R. Nakatsu.
Kevin Kline, SQL Sentry Director of Engineering Services, Microsoft SQL Server MVP since 2003 Twitter, Facebook, KEKline.
Key Perf considerations & bottlenecks Windows Azure VM characteristics Monitoring TroubleshootingBest practices.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
DBMS Transactions and Rollback Recovery Helia / Martti Laiho.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
Diagnosing Performance with Wait Statistics Robert L Davis Principal Database
Troubleshoot Customer Performance Problems Like a Microsoft Engineer Tim Chapman Senior Field Engineer, Microsoft.
Response Time Analysis A Methodology Around SQL Server Wait Types Dean Richards.
SQL Server Deep Dive Denis Reznik Data Architect at Intapp.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
Oracle Database Architectural Components
SQL Server Internals & Architecture Naomi Williams, SQL DBA LinkedIn
Dropping acid - Why Does SQL Server Do what it Does?
SQL Server Internals & Architecture
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 Internals Overview
Wait Stats and You.
Chapter Overview Understanding the Database Architecture
SQL Server Internals & Architecture
Inside SQL Server Wait Types
Hustle and Bustle of SQL Pages
SQL Server Internals & Architecture
Working with Very Large Tables Like a Pro in SQL Server 2014
SQL Server Internals - Performance Troubleshooting Hands on Approach -
Troubleshooting SQL Server Basics
SQLSaturday 393- May 16, Redmond, WA
The Vocabulary of Performance Tuning
SQL Server Internals & Architecture
Real world In-Memory OLTP
Proving Hardware Bottlenecks &
What Is a Latch? …and Why Do I Care? Eddie Wuerch, mcm
SQL Server Internals & Architecture
මොඩියුල විශ්ලේෂණය SQL Server Waits. Tables රැසක් එකට එකතු කිරීම.
SQL Server Performance Tuning
The Vocabulary of Performance Tuning
Transaction Log Performance Tuning
Jean Joseph DBA/Developer
Jean Joseph DBA\DEVELOPER
Updating Databases With Open SQL
Database administration
The Vocabulary of Performance Tuning
Using wait stats to determine why my server is slow
Inside the Database Engine
Working with Very Large Tables Like a Pro in SQL Server 2017
Performance Tuning ETL Process
SQL Server Internals And Architecture.
Updating Databases With Open SQL
Developing Microsoft SQL Server Databases
Inside the Database Engine
Inside the Database Engine
Presentation transcript:

Статистика ожиданий или как найти место "где болит" Sergey Syrovatchenko

About me Sergey Syrovatchenko SQL Server DBA Хабр: @AlanDenton Mail: sergey.syrovatchenko@gmail.com

Troubleshooting Wait Stats Error Log Execution Plan Performance Monitor XEvents DMV SQL Profiler

Wait Stats When SQL Server executes a request but the resources aren’t available to complete the request a wait occurs. All waits is logged. Waits will show you all performance bottlenecks in your SQL Server instance.

Thread Scheduling SQL Server uses his own schedulers to manage CPU time for threads. Thread scheduling performed by the SQLOS layer of Storage Engine. Each logical processor core has a scheduler.

Scheduler SCHEDULER Signal Wait Time Resource Wait Time RUNNING SPID 56 SCHEDULER Signal Wait Time Resource Wait Time SPID 58 SPID 67 SPID 57 SPID 72 RUNNABLE SUSPENDED Runnable Queue Waiter List CPU Time + Signal Wait Time + Resource Wait Time Wait Time Total Execution Time

How SQL Server executes a query? Thread Pool <= 4 CPU = 512 > 4 CPU = 512 + ((CPU – 4) * 16) Worker Worker Worker Task Execution Parsing Binding Optimization Query Execution Tasks Queue Task Task Cache Task DB 01010100 Plan Cache Buffer Pool SELECT…

Most Common Waits CPU/Parallelism: SOS_SCHEDULER_YIELD, CXPACKET, THREADPOOL Memory: RESOURCE_SEMAPHORE, PAGELATCH_*, RESOURCE_SEMAPHORE_QUERY_COMPILE Disk: WRITELOG, PAGEIOLATCH_*, IO_COMPLETION, WRITE_COMPLETION, ASYNC_IO_COMPLETION, BAD_PAGE_PROCESS Locking: LCK_* Network: ASYNC_NETWORK_IO Backup: BACKUPIO, BACKUPBUFFER Other: TRACEWRITE, OLEDB

CXPACKET Gather Streams Stream Aggregate Repartition Streams Hash Match Aggregate Distribute Streams T1 CXPACKET T1 CXPACKET T2 CXPACKET T2 CXPACKET T3 T3

PAGEIOLATCH Buffer Pool Access Methods Buffer Manager Database Files 8K SELECT 64K Database Files

PAGELATCH Buffer Pool 2 1 tempdb ndf file PFS GAM tempdb mdf file PFS X 1 tempdb mdf file PFS GAM CREATE TABLE # tempdb mdf file CREATE TABLE # tempdb ndf file PFS GAM CREATE TABLE # CREATE TABLE # CREATE TABLE # CREATE TABLE # PFS GAM CREATE TABLE # CREATE TABLE #

WRITELOG Buffer Pool Access Methods Buffer Manager Log Manager INSERT UPDATE DELETE 4 1 Buffer Pool Access Methods 2 Buffer Manager 3 8K 11 5 9 10 4 Lazy writer Checkpoint 64K Log Manager async 8 6 Database Files Transaction Log sync Log Buffer 7 60K buffer full tran commit sys.sp_flush_log

BACKUPIO + BACKUPBUFFER Read Thread Write Thread Buffer Buffer Buffer Buffer DB BAK Buffer Buffer Buffer Buffer ASYNC_IO_COMPLETION BACKUPIO ASYNC_IO_COMPLETION ASYNC_NETWORK_IO Buffer Buffer BACKUPBUFFER

Thank You! sergey.syrovatchenko@gmail.com