Understanding RAID

Written by Joshua Moore

June 11, 2007 | 05:25

Tags: #hard-drive #raid #redundancy

RAID0 – block level striping with no redundancy

RAID0 is one of the most common RAID levels used in desktop systems for increased performance as today it is integrated on nearly every new motherboard. This level of RAID simply involves striping with no mirroring or parity, though it can be combined with either, but we’ll come to that later.

Every file written to the array, provided that it is larger than 512 bytes (or another pre-defined block/stripe size) is split across multiple disks. If the file fits inside one block, it’s simply written to the next available block in the array and resides on a single disk. This can accelerate the reading and writing of files as these operations are performed using all disks in parallel. This works particularly well at speeding up both random and sequential read and write performance.

The idea of RAID0 is often very appealing to hardware and performance enthusiasts as on paper it appears to offer vastly improved performance versus using a single disk to store your data. It is true that in certain circumstances RAID0 can indeed speed things up tremendously, but these circumstances aren’t particularly common on a home PC. Hard drive benchmarks may be partly to blame for uptake of RAID0 in home systems (and the fanboy-ism that often accompanies it).

We already know from the introduction to hard drive technology that benchmarking a hard drive is notoriously difficult and rarely gives an indication of real-world performance. The majority of hard drive benchmark programs base their scores on sequential transfer rates, an area where RAID0 excels at delivering big numbers but has little relevance to desktop performance.

Understanding RAID RAID0 and RAID1
If you work with very large files (several hundred megabytes and larger) quite a bit then RAID0 may be for you. Audio and video production tend to be the main benefactors of RAID0 when used at home. The sequential write speed that RAID0 can provide is occasionally a necessity when recording uncompressed HD video and the high sequential transfers can speed up editing ultra high resolution photos, high fidelity audio or video.

Level loading times in games can also occasionally benefit from installing the game on a RAID0 array. While you may not save hours, loading a map in Battlefield 2142 that few seconds quicker may make the difference of you nabbing the (insert uber-gun here) before anyone else gets to it! Note that RAID0 does not, and will never (ever!) give you faster frame rates in your games. Operating system loading times can occasionally be slightly reduced, but the RAID controller’s BIOS needs to initialise at POST. This added time is usually enough to more than outweigh a couple seconds saved at the Windows splash screen.

RAID0 is also great for random reads and writes, but this sort of disk activity is primarily reserved for servers. With a large stripe size and many small files, instead of spreading each file out over the disks in the array, each file can be stored on separate drives. Most RAID controllers are capable of carrying out read and write operations independently on each disk in the array so files can be written to one disk in the array while other files are being read from another disk. Given that no parity information needs to be calculated in a RAID0 array, files can be written to disk very quickly as there is little controller overhead. This aspect of RAID0 would benefit something like a web server, but not the type that you run in your bedroom for a laugh, more like the one you’re reading this article from right now.

There is however a but, and it’s a big but (we’re talking J-Lo here) - if a single disk fails in a RAID0 array all data on the array becomes unrecoverable, short of specialised data recovery services (and even then you’ll be lucky, not to mention bankrupt). Even if you accidentally yank a cable out of a drive, which is oh so easy with most SATA cables, you risk losing everything. RAID0 is a bit of a misnomer as no redundancy is provided, but AID0 just doesn’t sound right. Modern drives as a whole are pretty reliable and often last several years without any issues, often lasting longer that most users would keep a drive before replacing it due to size constraints, but all drives are not created equally.

There is no way of telling whether a disk will last 10 years, 10 months or 10 minutes. Using many drives actually goes so far as to increase the risk of experiencing a disk failure. Simply put, a four disk RAID0 array is four times as likely to fail as a single drive. Wagering all of your data on not having just one lemon of a drive in the array is risky business. Additional risk is introduced when using an on-board controller for RAID0. In the event of a motherboard failure, you’re probably going to need to start restoring from backups, though data loss has a funny way of always popping up when backups have slipped your mind for some months.

If you find yourself in one of the situations where RAID0 can provide a noticeable performance gain, you are likely to also hold data security as a high priority and should be using RAID0+1 or RAID10 anyway. Failing that, it’s certainly a good idea to make sure that any data which you consider the least bit important is backed up regularly.

Pros
  • Performance is increased when working with large files
  • 100 percent space efficiency, none sacrificed to redundancy
  • Inexpensive - integrated or software controllers perform well
Cons
  • Increased risk of data loss
  • Does not increase performance in the vast majority of home applications


RAID1 – Mirroring with no striping

This is the most common ‘security’ RAID level used in desktop systems as, like RAID0, support is integrated into most motherboards. RAID1 simply involves identical data being written the two (no fewer, no more) disks in the array. The main advantage of this is obvious: if one of the drives fails you haven’t lost any data. When one of the disks fails, the array runs in a degraded state. Given that RAID1 does not involve any complex parity calculations, data security is the only thing that gets degraded.

A RAID1 array can continue to operate in a degraded state with very similar performance characteristics to an array running with both drives online. Provided that the RAID controller supports hot-swapping (many on-board RAID controllers do not), the failed disk can be replaced and the array can be rebuilt without even switching the system off. The data security provided by RAID1 comes at the expense of space efficiency. Only half of the physical capacity of a RAID1 array is usable space meaning that when you use two 500GB drives in RAID1, one of them suddenly disappears as if by magic.

Understanding RAID RAID0 and RAID1
Performance wise, RAID1 doesn’t differ greatly from a single disk. Sequential read and write performance remains nearly identical while random read and write performance are slightly different, one higher and the other lower. Random read performance can be quite a bit better than a single drive provided that the controller supports servicing different read requests from each drive in parallel, but this is primarily a benefit to server use. The fact of the matter is that there isn’t much random access in a desktop pc, certainly not enough for RAID1 to offer noticeable differences. There is a flip-side to this though, as the random write performance in RAID1 is slightly worse than that of a single drive, as data has to be written to both drives in the same place.

One should never consider RAID1 as a backup medium. While mirroring will indeed protect your data from a physical disk failure, it will not protect against software related data loss. For example, if a particularly nasty virus ravages your system, it will kindly destroy the data on both drives in unison. There is also a chance of data loss due to physical drive defects, such as bad clusters, as the controller may duplicate the data loss across both of the drives.

Pros
  • High reliability
  • Implemented well in on-board RAID controllers
  • Read performance can be slightly better than a single drive
Cons
  • 50 percent space efficiency
  • Write performance slightly worse than a single drive

Discuss this in the forums
YouTube logo
MSI MPG Velox 100R Chassis Review

October 14 2021 | 15:04

TOP STORIES

SUGGESTED FOR YOU