diglloyd
Mac Performance Guide

eSATA for Your MacBook Pro
Extreme reliability and performance. Delivered.
Our premium upgrade service provides peace of mind.
MPG Photo Workstation MPG Pro Laptop

WindInMyFace.com — Bicycling blog, gear, rides, training, nutrition

Are you a photographer?

Don’t miss all the great articles, news and analysis at

diglloyd.com

Making Sharp Images

diglloyd.com

RAID striping and mirroring

Last updated July 11, 2010 - Send Feedback

Please read the Partitioning page for background.

RAID comes in a variety of flavors. The most straightforward ones a a RAID mirror, which uses redundant hard drives (duplicates), and RAID striping, which splits the workload across drives.

High performance — a RAID stripe

A RAID-0 stripe uses 2 or more hard drives to store alternating chunks of the data. This is known as RAID striping, and it splits the workload among the drives. Since the drives can work in parallel (simultaneously), performance is greatly enhanced when large data transfers are made.

A stripe offers several advantages:

  • Greatly increased performance; using two drives doubles performance, using four drives quadruples it, etc. The increase is not exact, but it’s very close.
  • Increased capacity; with two drives the capacity is doubled, with four drives the capacity is quadrupled, etc.
  • Presents multiple drives as a single volume on the desktop. Instead of a mess of 2/3/4 individual volumes, there is one larger and much faster single volume.

A RAID-0 stripe is said to “scale” if the sustained transfer speed for N drives is N times the speed of a single drive. For example, performance with two drives can be expected to be about twice that of a single drive, for “large” data transfers.

Stripe size

The stripe size is the size of chunk that each drive in the stripe handles. In most cases, a 32K stripe size is a good choice.

Programs that write data which is smaller than the stripe size will not see an improvement from striping, since a single drive within the stripe has to handle such requests.

For example, writing 4K, 8K, 23K of data to a RAID-0 volume that has a 32k stripe size means that the data will just land on one drive— it’s smaller than the stripe size (even if the data straddles two drives, the advantage is small). But writing (for example) 1MB of data means that all the drives get a share, and thus will handle part of the data in tandem, providing far higher performance. Unfortunately, there is no shortage of poorly-programmed applications that make small reads or writes, negating any advantage or a stripe.

High reliability — a RAID mirror

A RAID mirror duplicates data onto two or more disk partitions (on two or more hard drives). A RAID mirror is an exact copy. Delete something, and it’s gone from both.

Keep in mind that human error (eg deleting a file) is instantly reflected in a RAID mirror since all drives in a mirror contain identical copies of the same data. Mirroring is not a backup system, it’s a reliability system. A RAID mirror does not protect you against theft or natural hazards.

If there are N drives (partitions) in the mirror, then N-1 of them can fail with no loss of data. The most common setup is with N = 2 drives. When a drive fails, operation continues seamlessly with the other drive: no data is lost. The failed drive can be replaced, and the mirror can rebuild, automatically (this is one oddball way to backup: swap one of the drives in the mirror with a blank one).

Mirroring generally runs at the speed of a single drive or a bit slower for writes (all drives can be written simultaneously, but there is some overhead). A mirror can offer higher read speed, but not necessarily.

Choose mirroring when reliability is the primary concern (even your boot drive can be mirrored!).

Advanced setups can use both striping and mirroring with multiple partitions on multiple drives. Some advanced RAID configurations require hardware support; Apple sells a RAID card with the Mac Pro.

Backup is still required

A consistent backup strategy is critical, even with mirroring: Acts of Dog can occur (fire, hurricane, lighting bolt, etc). Mirroring is not a backup system, it’s a reliability system.

I don’t use RAID mirror because I value performance, and I backup regularly with both Apple’s Time Machine and with multiple external hard drives in external SATA cases. However, my diglloyd.com web server utilizes a RAID mirror for both the boot volume and the data volume, because no downtime is acceptable.

High performance and reliability— RAID 5 stripe + parity

RAID 5 offers an ideal combination of striping + parity; this allows failure of one drive with no data loss. RAID 5 generally requires hardware support: either a RAID card card that implements it or an external enclosure that offers RAID 5 built-in to the enclosure. See the review of the Other World Computing QX2.

RAID 5 is not as fast as RAID 0 striping, but for many users it will be fast enough.

High performance and more reliability— RAID 10 stripe + mirror

RAID 10 offers striping and mirroring together, to allow for more drive failures. Data is Striped (RAID 0) over mirrored sets (RAID 1) of drives for fast redundancy. This requires four or more drives. For example, with four drives, two mirrors are created of two drives each, and those two mirrors are striped. This allows one drive from each mirror to fail, but failure of both drives in one mirror results in data loss.

RAID 10 requires hardware support: either a RAID card card that implements it or an external enclosure that offers RAID 10 built-in to the enclosure. See the review of the Other World Computing QX2.

RAID 10 is not as fast as RAID 5, but for many users it will be fast enough.

Setting up basic RAID volumes

Please see this page.

Conclusions

For more examples, see The DIGLLOYD Mac Pro.

Setting up RAID is not hard, and has many benefits. Users looking for high performance can achieve it cost-effectively, and users who want reliability can have it too. Two drives instead of one drive is all it takes, and drives in 2008 are very inexpensive.

Setting up RAID is even faster and easier with SoftRAID.

Help us help you! You support the reviews and how-to articles on this site when you buy from trusted site sponsor Other World Computing (use the links/ads anywhere in this Guide).

OWC does not sell Macs, so when buying a Mac, please click here to go to the Apple store, but remember to save money by getting your memory and hard drives, backup systems, etc at OWC.

Please let others know about this site by posting a hyperlink to site page(s) in discussion forums, web sites, etc — thank you!


Bus-powered Portable Storage

diglloyd Home Page | Terms of Use | Copyright © 2008-2011 diglloyd Inc, all rights reserved. | Contact | Newsletter + Alerts | Press