Skip to content

shannonlowder.com

Menu
  • About
  • Biml Interrogator Demo
  • Latest Posts
Menu

70-450: SQL and RAID 5/10

Posted on October 24, 2011October 24, 2011 by slowder

Continuing SQL and RAID, let’s pick up RAID 5 and RAID 1+0 (or just 10)  This content is still for the first skill measured in the 70-450, per the official Microsoft page for the 450:

Designing a SQL Server Instance and a Database Solution (14 percent)

  • Design for CPU, memory, and storage capacity requirements.
    • This objective may include but is not limited to: RAID, calculating table size, IO throughput, transaction per second, data compression, non-uniform memory access (NUMA), tempdb capacity

So let’s jump right back in!

 

RAID 5

In RAID 5, the data is striped across all the discs similar to RAID 0, but with RAID 5, you also get a parity bit.  This parity bit can be used to reconstruct missing data, in cases of drive failure.  That way you get a speed boost on your read and writes, but you also get security from the parity bit.

RAID 5 optimizes reads and writes.  Since your writes are split across all those disks, you get a speed boost.  Reads and writes are (n-1) times faster than reading or writing to a single disk. N is the number of drives.  So, in the example to the right, reads and writes are 3 times faster than to a single disk.

You effectively lose one disk’s worth of space in RAID 5. The amount of space needed for parity data is 1/n.  So in our above diagram, we lose 1/4 of the space to parity storage. But, by giving up this drive space, you are gaining the ability to stand up to a single drive failure. When (not if) a drive failure occurs, your controller can use the remaining data to compute the missing data.  There is a cost to computing the missing data, so your reads and writes are going to slow down.  You’re going to want to replace the bad drive as soon as possible.

Raid 5 requires at least 3 drives. Yes, you’ll have to have 3 drives to create your RAID 5, The more drives you add, the faster the reads and writes become, But, the more drives you add, the greater your chances of a drive failure occurring.  That’s just how it is, the more complex the system, the more chance for failure.

RAID 10

RAID 10 is my go to choice.  You get very fast IO, and the ability to handle failures in up to half of your drives (as long as you don’t lose both drives in a mirror.

RAID 10 is a RAID 0 of RAID 1s. Data is then striped across a collection of RAID1s.  Data is Striped and mirrored, so you get a huge read increase, and you do get a pretty good write increase, but this set up does give better read performance than write performance.

You lose half your space to the mirrored copy.  But as a result, you could lose one copy of every mirror set, and still be able to read data off your RAID.  As long as you don’t lose both member disks in a RAID 1 set, you’re OK.  You don’t want to leave a bad disk in your set for long, you wouldn’t want to risk losing the second disk in a mirror.

RAID 10 requires 4 disks to set up.  And considering 1/2 the disk space is spent on mirrors it can prove expensive.  But with the rise in availability of SANs, the difference in costs between leasing RAID5 space and RAID10 space will be pennies.  If you have very high transaction volume, and you have a very low tolerance for drive failure, RAID 10 is the choice to beat!

RAID 5 vs RAID 10

So when would I chose RAID 5 over RAID 10?  If the database I’m implementing will be significantly heavier on writes than on reads.  In RAID 5 you can write to each disk at the same time, in RAID 10, you only write to half the discs at the same time, then the RAID controller writes the mirrored copy.  Now, with some really nice SANs, that write penalty on RAID 10 is masked by having a ton (highly specialized measurement) of cache on the SAN.  But generally I’d chose a RAID 5 for write intensive databases.

Or if my client is cost conscious, then I might chose RAID 5 over RAID 10.  If I’m building out a server, and that server is going to use direct attached storage, RAID 10 would cost 2x the storage space I want, while RAID 5 would only cost me 1/n more.

Next time

I’m going to hit you with a handful of scenarios requiring you to choose one or more raid solutions.  It’ll be up to you to choose the best one given the information.  If you have any questions before then, let me know.  I’m here to help!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Docker-based Spark
  • Network Infrastructure Updates
  • Docker and Watchtower
  • Delta Sharing – Data Providers
  • SQL Server to Databricks Profiler

Recent Comments

  1. slowder on Data Engineering for Databricks
  2. Alex Ott on Data Engineering for Databricks

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • October 2018
  • August 2018
  • May 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • June 2017
  • March 2017
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • February 2013
  • January 2013
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • November 2004
  • September 2004
  • August 2004
  • July 2004
  • April 2004
  • March 2004
  • June 2002

Categories

  • Career Development
  • Data Engineering
  • Data Science
  • Infrastructure
  • Microsoft SQL
  • Modern Data Estate
  • Personal
  • Random Technology
  • uncategorized
© 2023 shannonlowder.com | Powered by Minimalist Blog WordPress Theme