30.06.2013 Views

Performance Tuning with SQL Server Dynamic Management Views

Performance Tuning with SQL Server Dynamic Management Views

Performance Tuning with SQL Server Dynamic Management Views

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7: OS and Hardware Interaction<br />

Returned will be values such as the following:<br />

object_name instance_name counter_name cntr_value<br />

-------------------------------- -------------- ------------------------------ --------------<br />

--<br />

<strong>SQL</strong><strong>Server</strong>:Latches Average Latch Wait Time (ms) 3.84907340420574<br />

<strong>SQL</strong><strong>Server</strong>:Locks _Total Average Wait Time (ms) 188.428878069211<br />

<strong>SQL</strong><strong>Server</strong>:Locks AllocUnit Average Wait Time (ms) NULL<br />

<strong>SQL</strong><strong>Server</strong>:Locks Application Average Wait Time (ms) 263.055555555556<br />

<strong>SQL</strong><strong>Server</strong>:Locks Database Average Wait Time (ms) NULL<br />

<strong>SQL</strong><strong>Server</strong>:Locks Extent Average Wait Time (ms) NULL<br />

<strong>SQL</strong><strong>Server</strong>:Locks File Average Wait Time (ms) 471.392592592593<br />

<strong>SQL</strong><strong>Server</strong>:Locks HoBT Average Wait Time (ms) NULL<br />

<strong>SQL</strong><strong>Server</strong>:Locks Key Average Wait Time (ms) 150.459888113501<br />

<strong>SQL</strong><strong>Server</strong>:Locks Metadata Average Wait Time (ms) 95.7042253521127<br />

<strong>SQL</strong><strong>Server</strong>:Locks Object Average Wait Time (ms) 610.405089408528<br />

<strong>SQL</strong><strong>Server</strong>:Locks Page Average Wait Time (ms) 399.793103448276<br />

<strong>SQL</strong><strong>Server</strong>:Locks RID Average Wait Time (ms) 1860<br />

From this output, we can see that we've no waiting on Database, Extent, and HoBT<br />

(heap or B-tree) objects, but have spent an average of 263 milliseconds on Application<br />

locks (which are used on this particular system to implement single-threaded reads from<br />

a queue), 150 milliseconds on Key locks, and 399 on Page locks, amongst others.<br />

Monitoring Machine Characteristics<br />

A common task for DBAs is to monitor the configurations and characteristics of their<br />

servers, as well as to track changes to these settings over time. The sys.dm_os_sys_<br />

info DMV contains a host of values that will give you a basic understanding of how<br />

the interface between the OS and <strong>SQL</strong> <strong>Server</strong> is configured. It returns a single row,<br />

summarizing the characteristics of a given machine, in terms of static configuration, such<br />

as the number of processors, as well as how long a server has been running. Columns<br />

represented in the view include those listed below.<br />

288

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!