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 6: Physical Disk Statistics and Utilization<br />

a SAN <strong>with</strong> many other users, or someone is serving web pages from the same physical<br />

drives as your database.<br />

We also briefly discussed the use of the sys.dm_io_pending_io_requests DMV to<br />

see currently pending I/O requests, i.e. to view how much data is currently in the I/O<br />

pipeline to be processed by <strong>SQL</strong> <strong>Server</strong> but, for some reason, has not been consumed.<br />

Next, we demonstrated two methods of finding the read:write ratio at the file, database,<br />

or table level. This information is invaluable when determining, for example, the most<br />

appropriate RAID configuration for a given disk (RAID 10 for frequently updated data,<br />

RAID 5 for read-only data, and so on). We saw how the value for this ratio could vary<br />

dramatically, depending on whether it was based on the amount of data being read or<br />

written to disk, or on the number of individual read/write operations. If you see a value of<br />

99:1 in terms of amount of data, but 40:60 in terms of the number of operations, it means<br />

that your queries are reading way too much data, and you have some tuning work to do.<br />

Finally, we covered the sys.dm_db_file_space_usage DMV, and used it to<br />

investigate tempdb space usage, an understanding of which is critical since, in <strong>SQL</strong><br />

<strong>Server</strong> 2005 and 2008, tempdb is central to so much of the query activity on your server.<br />

If you are a newbie to performance tuning from a disk I/O perspective, I know that you<br />

are thinking, "Disk I/O tuning is hard!" and that is completely true. In all but the most<br />

talented shops, it is a very common practice to guess high and buy too much hardware<br />

for small applications, and guess way too low for very active applications. The goal of this<br />

chapter and, in fact, the whole book is to help you understand the tools that are available<br />

to help you to reach the "right" solution.<br />

261

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

Saved successfully!

Ooh no, something went wrong!