introdução a wait types e queues

20
Introdução a Wait Types e Queues Nivel 100 Marcos Freccia Chapter Leader – Virtual PASS PT

Upload: marcos-freccia

Post on 03-Dec-2014

1.173 views

Category:

Documents


4 download

DESCRIPTION

Apresentação sobre Wait Types and queues no SQL Saturday 245.

TRANSCRIPT

Page 1: Introdução a wait types e queues

Introdução a Wait Types e Queues

Nivel 100

Marcos FrecciaChapter Leader – Virtual PASS PT

Page 2: Introdução a wait types e queues

Quem sou?

2 |

Database AdministratorPass Chapter Leader – Virtual PASS PTPass Chapter – MCITP SCBlog: http://marcosfreccia.wordpress.comTwitter: @sqlfrecciaE-mail: [email protected]

Page 3: Introdução a wait types e queues

Agenda

O que são Wait Types e Queues Porque estou esperando? O que estou esperando? Afinal é normal eu estar esperando?

Page 4: Introdução a wait types e queues

O que são Wait Types

Descreve o comportamento do SQL Server a cada espera.

A cada passo e a cada espera, um tipo de wait ocorre.

Baseado em estatisticas o SQL Server determina pelo o que está esperando

Page 5: Introdução a wait types e queues

O que são Queues

Queues são representados por objetos do Performance Monitor.

Baseado em queues você determina o estado do recurso mais utilizado

Cada counter é considerado uma queue.

Page 6: Introdução a wait types e queues

Porque estou esperando?

Você precisa de um recurso. Você não tem o recurso

Logo você espera pelo recurso

SQLOS Schedulers

Threads (Workers)

Page 7: Introdução a wait types e queues

Porque estou esperando?

Running

SuspendedRunnable

Page 8: Introdução a wait types e queues

O que estou esperando?

Waits são dividas em grupos Resource Waits Queue Waits External Waits

Page 9: Introdução a wait types e queues

O que estou esperando?

Resource Waits IO Memoria CPU Rede

Queue Waits Background tasks

Deadlock Monitoring Lazy Writter Checkpoint

External Waits Linked Server Extended Stored Procedures

Page 10: Introdução a wait types e queues

O que estou esperando?

Como monitorar?

sys.dm_os_wait_stats wait_type waiting_tasks_count wait_time_ms max_wait_time_ms signal_wait_time_ms

Page 11: Introdução a wait types e queues

O que estou esperando?

Como monitorar?

sys.dm_os_waiting_tasks session_id wait_duration_ms blocking_session_id resource_description

Page 12: Introdução a wait types e queues

O que estou esperando?

Como monitorar?

Performance Monitor SQL Server Objects Windows Objects

Page 13: Introdução a wait types e queues

O que estou esperando?

Waits comuns LCK_M_* CXPACKET SOS_SCHEDULER_YIELD WRITELOG LOGBUFFER ASYNC_NETWORK_IO PAGEIOLATCH_* PAGELATCH_*

Page 14: Introdução a wait types e queues

O que estou esperando?

Performance counters comuns PhysicalDisk

Avg Disk Bytes/Read Avg Disk Bytes/Write Avg Disk sec/Read Avg Disk sec/Write

SQLServer:Buffer Manager Page Life Expectancy Checkpoint pages/sec

SQLServer:Memory Manager Total Server Memory (KB) Target Server Memory (KB) Memory Grants Pending

Performance counters comuns Paging File

%Usage

Process %Processor Time (sqlserv)

SQLServer: Statistics Batch Requests/sec SQL Compilations/sec SQL Recompilations/sec

Page 15: Introdução a wait types e queues

DEMO

PAL SQL Scripts Gleen Berry’s script

Page 16: Introdução a wait types e queues

Afinal é normal eu estar esperando?

Depende!

Page 18: Introdução a wait types e queues

Dúvidas?

26/11/2011 |18 |

Page 20: Introdução a wait types e queues

Obrigado

26/11/2011 |20 |