Sunday, October 4, 2009

RAID-0 vs a Standalone Hard Drive

Jump to the Charts - Jump to the Table

I’ve been looking for a way to speed up secondary storage access.  Over the past few months I’ve looked at Solid State Drives, faster RPM spin drives (e.g., Western Digital’s VelociRaptor), bigger on-board cache (16MB vs 8MB), support for Native Command Queuing via the Advanced Host Controller Interface (AHCI) and, lastly, RAID-0.

Solid State Drives would probably offer the fastest overall read times.  Since one of my goals has been to shorten the boot cycle this is clearly a win.  Unfortunately they’re still a bit too pricey.

On the spin drive front, faster RPMs (assuming I’m not interested in SCSI) usually means going for a drive that operates at either 7200 RPMs or 10,000 RPMs.  Western Digital’s VelociRaptor spins at 10,000 RPMs and blows away every other drive in its class in benchmarks.  It’s not too pricey either coming in at $160 for the 150GB model at the local Frys.

Native Command Queuing (NCQ) places requests in a queue (up to ~32 requests) and allows them to be re-ordered to minimize the amount of repositioning necessary by the drive heads to satisfy all of the requests.  Mainstream CPUs use a similar optimization but call it out-of-order execution.  NCQ provides the biggest benefit when the workload results in HD I/O requests that are widely distributed across the disk.  While I think this would probably increase overall throughput, even in a desktop scenario, I didn’t think it would provide nearly as much bang as RAID-0 striping.  Throw in regular fragmentation and the locality of reference principle and NCQ looks less compelling.

Which brings me to the scenario I opted to try (RAID-0).  Why RAID-0?  RAID-0 spreads the data across each of the drives in the volume.  In theory this should yield a linear increase in throughput since writes and reads can occur simultaneously, minus some overhead, across the drives.

Thanks to the wonderful Intel Matrix Storage technology RAID support is “baked into” the motherboard and natively supported by Windows Vista.  By natively supported I mean that Vista can be installed onto a RAID volume out-of-the-box (XP could do this but required the user to provide drivers during the setup process).

On my board, CTRL+I during the boot up sequence brings up the Intel Matrix Storage Manager Console.  This allows you to define RAID volumes.  My setup is as follows:

RAID-0 Volume 0 = 3 Western Digital 160GB Caviar Blue drives

RAID-0 Volume 1 = 2 160GB drives (1 Seagate, 1 WD)

OEM versions of the WD drives sell for $44 so this actually ends up being cheaper than a single 150GB VelociRaptor.  It also has more than 3 times the space (RAID-0).

The results?  See for yourself below.

Standalone System Drive (No RAID):

Standalone System Drive

Three-Way RAID-0 System Drive (32k stripe size):

Three-Way RAID-0 System Drive

I tend to create a separate data partition to minimize contention with the system cache and program loading.  So instead of throwing out the old system and data drives I combined them into a second RAID-0 volume and use that for data.

Standalone Data Drive (No RAID):

Standalone Data Drive

Two-Way RAID-0 Data Drive (128k stripe size):

Two-Way RAID-0 Data Drive

Unfortunately the axes on the screenshots were automatically scaled to different ranges.  The following table highlights the results.

  Throughput (MB/s) Access Time (ms) Burst Rate (MB/s) CPU Usage
Standalone System Drive 54.7 18.5 68.1 2.6
3-way RAID-0 System Drive 130.1 15.9 75.7 8.9

improvement

75.4 2.6 7.6 -6.3
         
Standalone Data Drive 56.6 17.7 61.3 2.2
2-way RAID-0 Data Drive 70.5 18.6 61 3.1

improvement

13.9 -0.9 -0.3 -0.9

For the system drive Three-Way RAID-0 is a clear winner except for CPU Usage but with 4 hyperthreaded cores who cares? :)

Two-Way RAID-0 improves throughput but barely pulls even with the standalone data drive.  This may be due in part to the differing stripe size (128k vs 32k), drive mismatch (the drives in the 3-way setup are identical, the drives in the 2-way setup are not) or other factors.

At 130 MB/s average throughput the Three-Way RAID-0 setup is pushing in the neighborhood of 1Gb/s.  Sata II has a theoretical bandwidth of 3Gb/s.  I wonder if a Nine-Way RAID-0 would be enough to nearly saturate the Sata II link while still being usable?…

As for data backup, I’m taking a few approaches.  A nightly file based backup to an external HD and Windows Live Sync to a laptop for certain key directories.  Windows Live Sync provides nearly real-time backup to on another machine but each directory has to be configured manually and has a limit of 20,000 entries.  The theoretically less reliable Three-Way RAID-0 System Drive gets imaged nightly to an external hard drive.  Since it’s a system drive it’s setup to be rebuildable from installation media so a loss is less critical than it would be for items on the data drive.

No comments :

Post a Comment