<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'Hardware' and 'Best Practices'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Hardware,Best+Practices&amp;orTags=0</link><description>Search results matching tags 'Hardware' and 'Best Practices'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>The Zombie PerfMon Counter That Never Dies! Quick Tip</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/10/08/the-zombie-perfmon-counter-that-never-dies-quick-tip.aspx</link><pubDate>Mon, 08 Oct 2012 11:55:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45480</guid><dc:creator>KKline</dc:creator><description>&lt;h2 style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"&gt;&lt;/h2&gt;&lt;h2&gt;The PerfMon Counters That Just Won't Die&lt;/h2&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;img class="alignright size-medium wp-image-2093" title="zombie-baby1" width="300" height="296" style="border:1px solid black;cursor:default;float:right;font-size:13px;font-weight:normal;margin:2px;" src="http://kevinekline.com/wp-content/uploads/2012/10/zombie-baby1-300x296.jpg"&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;One of the things that's simultaneously great and horrible about the Internet is that once something gets posted out in the ether, it basically never goes away. &amp;nbsp;(Some day, politicians will realize this. &amp;nbsp;We can easily fact check their consistency). &amp;nbsp;Because of longevity of content posted to the Internet, a lot of performance tuning topics become "zombies". &amp;nbsp;We shoot 'em in dead, but they keep coming back!&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;In other words, those old recommendations&amp;nbsp;&lt;em&gt;were&amp;nbsp;&lt;/em&gt;a suggested best practices for long ago, for a specific version of SQL Server, but are now inappropriately for the newer version. &amp;nbsp;It's not uncommon for me, when speaking at a conference, to encounter someone who's still clinging to settings and techniques which haven't been good practice since the days of SQL Server 2000. &amp;nbsp;Here's an example of&amp;nbsp;&lt;a href="http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlops6.mspx"&gt;Microsoft SQL Server 2000 Best Practices that are very version-specific&lt;/a&gt;.&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;So here's an example. &amp;nbsp;The %Disk Time counter and the Disk Queue Length were heavily recommended as a key performance indicator for IO performance. &amp;nbsp;SQL Server throws a lot of IO at the disks using scatter/gather to maximize the utilization of the disk-based IO subsystem. &amp;nbsp;This approach leads to short bursts of long queue depths during checkpoints and readaheads for an instance of SQL Server. &amp;nbsp;Sometimes the server workload is such that your disk can't keep up with the IO shoved at it and when that happens, you'll see long queue lengths too.&amp;nbsp; The short burst scenario isn't a problem. &amp;nbsp;The lengthening queue length scenario usually is a problem. &amp;nbsp;&amp;nbsp;So is that a good practice?&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;strong&gt;In a word, not-so-much.&lt;/strong&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Those counters can still be of some use on an instance of SQL Server which only has one hard disk drive. &amp;nbsp;But that's&amp;nbsp;&lt;em&gt;exceedingly&lt;/em&gt;&amp;nbsp;rare these days. &amp;nbsp;Why?&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;The PerfMon counter %Disk time is a bogus performance metric for several reasons. &amp;nbsp;It does not take into account&amp;nbsp;asynchronous&amp;nbsp;I/O requests. &amp;nbsp;It can't tell what the real performance profile is for an underlying&amp;nbsp;&amp;nbsp;RAID set may be, since they contain multiple disk drives. &amp;nbsp;The PerfMon counter Disk Queue Length is also mostly useless, except on SQL Server's with a single physical disk, because the hard disk controller cache obfuscates how many IO operations are actually pending on the queue or not. &amp;nbsp;In fact, some hard disks even have tiny write caches as well, which further muddies the water was to whether the IO is truly queued, in a cache somewhere between the OS and the disk, or has finally made it all the way to the&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Cmos"&gt;CMOS&lt;/a&gt;&amp;nbsp;on the disk.&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;h2&gt;Better IO PerfMon Counters&lt;/h2&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Instead of using those PerfMon counters, use the Ave Disk Reads /sec, Avg Disk Write /sec, and Avg Disk &amp;nbsp;Transfers/sec&amp;nbsp;to track the performance of disk subsystems. &amp;nbsp;These counters track the average number of read IOs, write IOs, and combined read and write IOs to occured in the last second. &amp;nbsp;Occassionally, I like to track the same metrics by volume of data rather than the rate of IO operations. &amp;nbsp;So, to get that data, you may wish to give these volume-specific PerfMon counters a try:&amp;nbsp;Avg Disk &amp;nbsp;Transfer Bytes/sec, Ave Disk Read Bytes /sec, and Avg Disk Write Bytes/sec&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;h2&gt;For SQL Server IO Performance, Use Dynamic Management Views (DMV)&lt;/h2&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;And unless you've been living in a cave, you should make sure to use SQL Server's Dynamic Management Views (DMVs) to check on IO performance for recent versions of SQL Server. &amp;nbsp;Some of my favorite DMV's for IO include:&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;ul&gt;&lt;li&gt;Sys.dm_os_wait_stats&lt;/li&gt;&lt;li&gt;Sys.dm_os_waiting_tasks&lt;/li&gt;&lt;li&gt;Sys.dm_os_performance_counters&lt;/li&gt;&lt;li&gt;Sys.dm_io_virtual_file_stats&lt;/li&gt;&lt;li&gt;Sys.dm_io_pending_io_requests&lt;/li&gt;&lt;li&gt;Sys.dm_db_index_operational_stats&lt;/li&gt;&lt;li&gt;Sys.dm_db_index_usage_stats&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Many of these DMVs are fully document in this Books Online article here at&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/ms187974.aspx"&gt;Microsoft SQL Server 2012&amp;nbsp;Index Related Dynamic Management Views and Functions&lt;/a&gt;.&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;So how are you tracking IO performance metrics? &amp;nbsp;Which ones are you using?&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;I look forward to hearing back from you!&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;Enjoy,&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;-Kev&lt;/div&gt;&lt;div style="font-size:13px;font-weight:normal;"&gt;&lt;p&gt;-&lt;a href="http://twitter.com/kekline"&gt;Follow me on Twitter!&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;</description></item></channel></rss>