<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Vipul Shah's SQL Blogs : Database Design</title><link>http://blogs.technet.com/vipulshah/archive/tags/Database+Design/default.aspx</link><description>Tags: Database Design</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Physical Database Storage Design and Disk Allocation</title><link>http://blogs.technet.com/vipulshah/archive/2007/03/14/physical-database-storage-design-and-disk-allocation.aspx</link><pubDate>Thu, 15 Mar 2007 00:35:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:694183</guid><dc:creator>vishah</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/vipulshah/comments/694183.aspx</comments><wfw:commentRss>http://blogs.technet.com/vipulshah/commentrss.aspx?PostID=694183</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;The system page file should not be on the same physical spindle as any database files, otherwise you will not get optimum performance from the drive as its disk head will be jumping between the page file and the database files. Ditto for placement of log files and tempdb. Ideally you’d have page file, data files, log files, and&amp;nbsp; tempdb on 4 separate physical spindles.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;A very good whie paper on Database Design and Disk Allocation:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;A href="http://www.microsoft.com/technet/prodtechnol/sql/2005/physdbstor.mspx" mce_href="http://www.microsoft.com/technet/prodtechnol/sql/2005/physdbstor.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/sql/2005/physdbstor.mspx&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;In addition above, following are some conversations I had with various experts on this topic:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;&lt;STRONG&gt;My Question:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;How should SQL database storage configured if it involves SAN?&amp;nbsp;&amp;nbsp; I have heard different answers:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Similar to what I have mentioned&amp;nbsp;in the begining of this blog&amp;nbsp;– dedicated LUNs RAIDED 1+0 each for tempdb, tranlogs, data files, and system database (this could go on a&amp;nbsp; mirrored local disks as well – not all eggs in one basket)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;With SAN - RAID doesn’t matter as it involves 100s of spindles with huge Non-volatile RAM cache with disk carved out off of shared LUNs which contains multiple spindles.&amp;nbsp;&amp;nbsp; You could get&amp;nbsp; a huge benefit of that big cache for read/write activity and disk distributed over lots of spindles.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this case, the LUNs could be shared across multiple applications, databases, etc.&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Out of two which one is recommended/best practice?&amp;nbsp; I have worked with systems similar to #1 and I have seen them performing very well.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I don’t have much exposure with large SAN.&amp;nbsp; Is #2 true with large SAN?&amp;nbsp;&amp;nbsp; If SAN admin doesn’t let me have dedicated LUNs, is it worth to fight for it?&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;Expert's Answer - I:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;There really isn’t a completely clear-cut answer to this, and honestly there are SAN experts whose careers are built on understanding how to optimize specific vendors’ SAN hardware.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;That said, the generalities as they apply to SQL are:&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;#1 represents conventional wisdom in configuring SANs, and is carried over from the locally-attached disks.&amp;nbsp; You want to isolate traffic and load to each of the classes of SQL storage so that they do not interfere with each other.&amp;nbsp; Certainly whatever scheme you choose at a very minimum the LUNs dedicated to the log files must be backed by RAID 0+1 sets.&amp;nbsp; The update penalty on RAID 5 is too high for logs which have very high update rates.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;From there, it depends on your ratio of update to read IO, and cost considerations.&amp;nbsp; If you can afford the storage, go RAID 0+1 across the board.&amp;nbsp; On the other hand, if you have significant sets of data which are not updated often (historical data, catalog data, etc.) then RAID 5 is a good choice, as it uses less physical disk.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;Most SAN implementations have the capability to subdivide the physical spindles into separate groups upon which your LUNs can be built, via one or two levels of indirection.&amp;nbsp; Still, you can use this technique to isolate the IO load for various SQL workloads.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;Finally, there is an emerging trend in the industry which says that the performance difference gained by this level of tuning does not justify the expense of managing it.&amp;nbsp; They advocate a simpler approach in which all spindles are grouped in one large group, and the array migrates data as needed to balance load.&amp;nbsp; This would be your #2 option.&amp;nbsp; Even in this case, you may want to have separate LUNs for different databases for management purposes, unless you have a HUGE number of databases, as in a hosting environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Comic Sans MS'"&gt;So, the bottom line is that it depends on the capabilities of your SAN hardware and your need to tune that last increment of performance out of your IO subsystem.&amp;nbsp; Balancing this against the cost of managing a more complex storage subsystem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;STRONG&gt;Expert's Answer - II:&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV&gt;we used the first approach&amp;nbsp;because we were using relatively low-end SAN equipment with &amp;lt;56 spindles and &amp;lt;2GB of cache memory.&amp;nbsp; in this case it was important to make sure that the LUNs were seperated by function so that there would not be contention and queuing.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;in some SAN scenarios there is so much cache memory available and the bandwidth to the disc media is so high that contention and queuing are virtually impossible&amp;nbsp;regardless of the LUN configuration.&amp;nbsp; a high-end &lt;SPAN id=lw_1175803171_0 style="BORDER-BOTTOM: #0066cc 1px dashed"&gt;Hitachi&lt;/SPAN&gt; SAN, for instance, could have up to 128GB of cache memory, and up to 1024 individual disc drives installed.&amp;nbsp; &lt;/DIV&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=694183" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/vipulshah/archive/tags/Database+Design/default.aspx">Database Design</category></item></channel></rss>