Home > SQL Server Tips > Database Management and Administration > SAN considerations for your SQL Server environment
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE MANAGEMENT AND ADMINISTRATION

SAN considerations for your SQL Server environment


Hilary Cotter
01.30.2008
Rating: -3.60- (out of 5)


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


SANs (Storage Area Networks) are playing an increasingly important role in SQL Server environments for several reasons. They include:

  • The increasing size of the average database
  • The increasing prevalence of clustered environments
  • Performance advantages of SANs
  • Storage efficiencies of SANs
  • The increasing importance of recoverability or disaster recovery
  • The SANs sole function is to store data and offer high reliability and high performance access to this data. It is a network which provides high-speed, highly reliable transportation of data for multiple servers which generally connect through a high speed optical network called fibre. A SAN consists of many high performance hard drives (typically several hundred) aggregated together with high performance controllers and caching; these hard drives are virtualized so that the consumer does not know which hard drives a SQL Server or other device connected to the SAN will access. A SAN administrator will present blocks of storage to servers using the SAN and these blocks of storage can consist of a single hard drive, multiple hard drives or portions of hard drives in a logical unit called a LUN (Logical Unit Number).

    SANS have several advantages over locally attached storage:

  • There is a distance limitation for SCSI connections which the SAN fibre network overcomes.

  • Most SANs provide features which allow you to clone, snapshot, or rapidly move data (replicate) from one location to another. File copies or bcp over your network simply are not scalable. This increases their usefulness for disaster recovery.

  • SANs play well with clusters. Clusters share resources between the nodes that form the cluster.

  • SANs will allow a cluster or a server to boot off a SAN.

  • SANs offer increased utilization of storage. With locally attached storage large amounts of disk space can be wasted. With a SAN you can expand or contract the amount of disk space a server or cluster c...

    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



    RELATED CONTENT
    SQL Server Database Modeling and Design
    Optimizing SQL Server indexes –- even when they're not your indexes
    Top tips and tricks for SQL Server database development
    Managing the development lifecycle with Visual Studio Team System 2008
    A first look at Visual Studio Team System 2008 Database Edition
    Testing transaction log autogrowth behavior in SQL Server
    Top 10 SQL Server Tips of 2008
    Tutorial: SQL Server indexing tips to improve performance
    Tutorial: Learn SQL Server basics from A-Z
    SQL Server database design disasters: How it all starts
    Can you shrink your SQL Server database to death?

    SQL Server Backup and Recovery
    SQL Server Mailbag: Data restoration and DB property management
    Achieving high availability and disaster recovery with SharePoint databases
    How to 'do' SQL Server disaster recovery
    The keys to database backup protection for SQL Server
    Choosing a SQL Server disaster recovery solution
    Licensing a standby server for SQL Server replication
    Can I encrypt and restore a database backup in SQL Server 2005?
    SQL Server errors, failures and other problems fixed from the trenches
    Get SQL Server log shipping functionality without Enterprise Edition
    SQL Server 2008 backup compression pros and cons
    SQL Server Backup and Recovery Research

    Microsoft SQL Server Performance Monitoring and Tuning
    Using traces in SQL Server Profiler
    SQL Server Mailbag: CALs, witnesses and unwanted changes
    SQL Server Mailbag: Data restoration and DB property management
    Working with IntelliSense in SQL Server 2008 Management Studio
    SQL Server Mailbag: Stored procedures, triggers and SSRS reports
    Troubleshooting Distributed Transaction Coordinator errors in SQL Server
    Clearing the Windows page file and its effect on server performance
    Optimizing SQL Server indexes –- even when they're not your indexes
    Performance implications of transaction log autogrowth in SQL Server
    The short course on how SQL Server really works

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    binary tree  (SearchSQLServer.com)
    block  (SearchSQLServer.com)
    data structure  (SearchSQLServer.com)
    DDBMS  (SearchSQLServer.com)
    entity-relationship model  (SearchSQLServer.com)
    initial extent  (SearchSQLServer.com)
    primary key  (SearchSQLServer.com)
    segment  (SearchSQLServer.com)
    tablespace  (SearchSQLServer.com)
    view  (SearchSQLServer.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary


    an access.

  • SANs will also offload some of the processing from the host system to the SAN itself.
  • However SANs, due to their cost and complexity, only make sense in large enterprises. They are not a good choice in:

  • small environments with relatively small databases
  • companies with limited budgets - SANs are very expensive
  • companies which only require disaster recovery on one or a few SQL Servers
  • Before you rush out and hit your procurement manager for a SAN or two, there are some considerations with using SANs with SQL Server.

    Caching

    One of the reasons SANs offer superior performance to locally attached storage is they typically offer significant caching. This is normally a good thing. But as a SAN provides storage services to multiple servers the available cache is also shared between multiple servers. So the large cache may not always be available to you. This is especially exacerbated if other IO intensive applications like Exchange are sharing the same cache as your SQL Server.

    It is also possible that some file or database operations (like a checkpoint) can saturate the cache resulting in degraded read and write performance. Do benchmarking with your SAN vendor to ensure that your SAN cache will be adequate to provide optimal database performance.

    LUNS

    SAN administrators will carve up the SANs storage into LUNs and the servers will "see" one or more of these units as a partition or drive. Consider three 200 GB drives in the SAN. This could be theoretically divided up into two LUNS 300 GB each, and different SQL Servers could access each LUN. You may end up in situations where the drives will experience twice the IO from both two servers than if the drives were dedicated to a single server. Most SANs support Zoning, which allows the SAN administrator to dedicate entire disks in the SAN to your LUN in order to isolate the IO on this drive to your SQL Server.

    Select the largest appropriate LUN possible as this will distribute the IO better over the multiple disks which comprise your LUN. Ultimately this will offer better IO performance.

    Also try to ensure that your log files are on a separate LUN consisting of a dedicated disk. Log files typically are written sequential patterns, unlike data files. Having a LUN with drives shared with another application will not provide optimal IO performance. Your SAN administrator may not permit you to dedicate a separate disk or set of disks to your log files.,p> There are special considerations if you have a large number of LUNs dedicated to your Windows Server. Please consult this kb article for more information.

    RAID

    Some SAN vendors may attempt to convince you to use RAID 5 for all data files and log files. Before following their advice, test using a representative load to ensure that RAID 5 will offer best performance for tempdb, your log files and any write intensive filegroups you may have.

    Host Components

    Check to ensure that the hardware your SQL Server (your host) uses to connect to the SAN delivers optimal performance and that you have the correct, most up to date drives for them.

  • Consider using multiple high speed host bus adapters (HBA) on the servers accessing your SAN. If you do use multiple HBAs ensure they are on different bus's to prevent bus saturation. As PCI slots have different bus speeds, see that the HBAs are plugged into the slots offering the highest speed.

  • Use multi-pathing software to balance the IO across all HBAs.

  • Consider aligning your NTFS volumes with the SAN track sectors. This can be done via the LUN offset on the SAN or through the Resource Kit DISKPAR tool to "sector" align the partition before you format it. What you want is 64 sectors equaling 32,768 bytes. By default you will have 63 sectors per track which will result in additional IO when reading blocks 4k and larger. Studies have shown improvements of 10 to 20 percent simply by properly configuring your partitions.

  • Work with your SAN vendor to ensure your SAN solution delivers optimal performance for your SQL Server.
  • Summary

    As you can see SANs are complex and delivering optimal performance of a SQL Server solution using a SAN is challenging. Benchmark your SQL Server to determine if bottlenecks exist with your SAN. Work with your SAN vendor to fine tune your solution and carefully consider and test any recommendations they may make.

    About the Author: Hilary Cotter has been involved in IT for more than 20 years as a Web and database consultant. Microsoft first awarded Cotter the Microsoft SQL Server MVP award in 2001. Cotter received his bachelor of applied science degree in mechanical engineering from the University of Toronto and studied economics at the University of Calgary and computer science at UC Berkeley. He is the author of a book on SQL Server transactional replication and is currently working on books on merge replication and Microsoft search technologies.

    More information on SearchSQLServer.com

  • Learn how to set up SQL Clusters on a SAN
  • SQL Server performance considerations when configuring a SAN
  • Choosing the right SAN makes life easier down the road

    Rate this Tip
    To rate tips, you must be a member of SearchSQLServer.com.
    Register now to start rating these tips. Log in if you are already a member.




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • SQL Server Development - .NET, C#, T-SQL, Visual Basic
    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts