Can someone explain RAID-0 in plain English?

40,755

Solution 1

A RAID-0 configuration utilizes 2 separate hard disks and writes "chunks" of data to each one to minimize actuator movement and read/write data faster (each arm does half the work in a sense). The caveat with this is that there is a lack of fault tolerance - if one drive dies, all of your data is gone. And since there is 2 drives handling your data, the chances of losing your data is basically doubled. You may want to look into RAID1+0, which give you speed benefits as well as fault tolerance. You can swap in another disk upon failure and have the other disks rebuild it.

The RAID-0 image from wikipedia domonstrates it well:

alt text

imagine the disks are showing a file called A.txt. Now, imagine each section as a 4096-byte cluster for example. Each disk is holding roughly 16384 bytes of this text file, and if one disk dies, there is no way to recover the other half.

If you are limiting yourself to 2 disks, I'd suggest only doing the RAID-0 configuration on the operating system. Any files important to you should be stored on separate media such as an external drive, or if it was a possibility, 1 more hard drive. If it meant the difference between having a fast machine without fault tolerance, or having a slower machine with my files safe, I'd choose a slower machine. For me at least, I'd rather be safe than sorry.

Solution 2

When you use RAID0 (striping), each block of data is written partially to one disk and partially to the other disk(s).

Say you write a 1MB file, if you have a single hard disk, it just writes the file. For the sake of argument lets say this takes 10 seconds.

With 2 disks in RAID0, each disk writes 0.5MB, for the sake of argument, this takes half the time, hence the performance increase.

Reading data is faster in a similar way, instead of reading 1MB from a single disk, 0.5MB will be read from 2 disks.

Note that RAID0 is not fault tolerant, i.e. the loss of a single disk in a RAID0 set will result in loss of the entire volume.

Windows 7 can create RAID0 volumes in the Disk Management tool. Your disks will need to be upgraded to dynamic disks and then you can create multi-disk volumes. Windows calls a RAID0 volume a "striped volume".

Solution 3

RAID-0 alternates data on two (or more) drives to double (or more) the speed of read access. But this speed comes at the cost of a HIGHER risk of losing your data since if either drive fails, all your data is lost.

RAID-1 mirrors your data by writing a copy on both drives which results in a LOWER risk of losing your data, but it doesn't usually read any faster.

If you have 4 drives, then you can get the best of both worlds by using RAID-10 which is really RAID 1+0, ora mirrored data set (RAID 1) which is then striped (RAID 0).

You may also have heard of RAID-5 which lots of servers use because it not only stripes data but saves parity info as well so that any single drive can fail, and all the data will be safe and can be reconstructed onto a blank drive when the failed drive is replaced.

However, now that terabyte drives are becoming common, the statistical likelihood of an error on a drive is so high, due to the large amount of data, that there is a serious risk of failure of RAID-5 systems where a second drive goes before the first one can be replaced. It's mainly an issue in systems with small numbers of drives, less than 8 or so.

The solution? Use RAID-10 and it turns out that RAID-10 is faster than the fancy RAID-5 since no parity calculations are needed.

So for a fast development machine, I strongly suggest using RAID-10 so that you get all the speed benefits of striping without risking your data. Have a look at this article which also has a nice diagram of RAID-10 that is currently missing from the Wikipedia article. And note that going to 4 drives, may only double your storage, but it increases your read time by four times! If you use a compiled language then you will see almost all of that four times increase in faster compiles.

Solution 4

Essentially, RAID-0 is a way of treating 2 drives like one. And as such, with two drives comes two buses, two buses equals more speed.

Think of it this way. Instead of writing a 1MB file to a single hard drive, you write every odd bit to one disc and all the even bits two a second disc. Theoretically, you can then write and read data 2x faster. But the file is split between the drives. Therefore if one disc fails, all the data on the second disc is completely useless.

Share:
40,755

Related videos on Youtube

Benoit
Author by

Benoit

web/software developer, .NET, C#, WPF, PHP, have philosophy degree, love languages, run marathons my tweets: http://www.twitter.com/edward_tanguay my runs: http://www.tanguay.info/run my code: http://www.tanguay.info/web my training videos: http://partner.video2brain.com/edwardtanguay

Updated on September 17, 2022

Comments

  • Benoit
    Benoit almost 2 years

    I've heard about and read about RAID throughout the years and understand it theoretically as a way to help e.g. server PCs reduce the chance of data loss, but now I am buying a new PC which I want to be as fast as possible and have learned that having two drives can considerably increase the perceived performance of your machine.

    In the question Recommendations for hard drive performance boost, the author says he is going to RAID-0 two 7200 RPM drives together. What does this mean in practical terms for me with Windows 7 installed, e.g. can I buy two drives, go into the device manager and "raid-0 them together"?

    I am not a network administrator or a hardware guy, I'm just a developer who is going to have a computer store build me a super fast machine next week. I can read the wikipedia page on RAID but it is just way too many trees and not enough forest to help me build a faster PC:

    RAID-0: "Striped set without parity" or "Striping". Provides improved performance and additional storage but no redundancy or fault tolerance. Because there is no redundancy, this level is not actually a Redundant Array of Inexpensive Disks, i.e. not true RAID. However, because of the similarities to RAID (especially the need for a controller to distribute data across multiple disks), simple strip sets are normally referred to as RAID 0. Any disk failure destroys the array, which has greater consequences with more disks in the array (at a minimum, catastrophic data loss is twice as severe compared to single drives without RAID). A single disk failure destroys the entire array because when data is written to a RAID 0 drive, the data is broken into fragments. The number of fragments is dictated by the number of disks in the array. The fragments are written to their respective disks simultaneously on the same sector. This allows smaller sections of the entire chunk of data to be read off the drive in parallel, increasing bandwidth. RAID 0 does not implement error checking so any error is unrecoverable. More disks in the array means higher bandwidth, but greater risk of data loss.

    So in plain English, how can "RAID-0" help me build a faster Windows-7 PC that I am going to order next week?

  • MDMarra
    MDMarra over 14 years
    RAID 1+0 will require 4 drives to get any of the benefit, otherwise it's just a RAID 1. You might want to note that as the OP was only planning on getting 2 drives.
  • MDMarra
    MDMarra over 14 years
    Modern 7200RPM drives can't saturate a single bus. The benefits in this case are the splitting of the blocks in a stripe across the two disks
  • John T
    John T over 14 years
    He never said that he's limited to 2 disks. He just wants to know how having 2 can increase performance.
  • Benoit
    Benoit over 14 years
    now that is speaking my language: "Windows 7 can create RAID0 volumes in the Disk Management tool." but is RAID-0 even relevant for a developer machine? I would think it would be more efficient (instead of "doubling the chance of failure" -- not something I want to do) to e.g. have an SSD which has the operating system and applications on it and a HDD which has my data, visual-studio projects on it, wouldn't that make more sense than RAID-0 in terms of speeding up my machine?
  • Stephenr
    Stephenr over 14 years
    As noted RAID-0 lacks the all important fault tolerance (redundancy) part. I would steer clear of it unless performance is the ONLY priority and even then it isn't all it is cracked up to be. It is good for copying large amounts of data but access times are not reduced and that is what is usually most noticeable in general use. Any reasonable SSD will produce a much more noticeable performance boost although with a much smaller capacity.
  • Chris Nava
    Chris Nava over 14 years
    RAID-0 trades reliability for speed. i.e. Your throughput speed is (very roughly) doubled and your fault tolerance is halved. If either drive in a RAID-0 array fails you loose ALL the data. RAID-0 is great for temporary storage of scratch data and also for your boot system (assuming it's well backed up) but don't use RAID-0 for long term storage of data you can't replace.
  • sblair
    sblair over 14 years
    @MarkM "Modern 7200RPM drives can't saturate a single bus" I agree, if a single drive could saturate the bus, there would be little point in RAID0. But this answer is still correct in pointing out that the (theoretical) transfer rates ought to be doubled.
  • Lee B
    Lee B over 14 years
    +1 for being the one of only two people to actually point out that 2x drives = 2x drive loss, unless some sort of fault-tolerance is added.
  • Lee B
    Lee B over 14 years
    +1 for being the one of only two people to actually point out that 2x drives = 2x drive loss, unless some sort of fault-tolerance is added.
  • DavidPostill
    DavidPostill over 7 years
    "If one of your hands gets chopped off, you lose half a loaf of bread forever." is not quite right. You lose the whole loaf of bread. If one drive fails you lose all the data.
  • Beracah
    Beracah over 7 years
    that's what I said. "this isn't a good approximation, since you can still eat a half loaf of bread". BUT, depending upon the size of the data, whether it fits within a stripe and the location of the FS metadata, you may not lose ALL THE DATA. But it does become a job for forensic recovery.