# RAID-ing two drives...why would you?



## gnatsum (Apr 10, 2005)

Other than the obvious double the space on a simulated single drive, why else would you want to raid two drives together?


----------



## MacDoc (Nov 3, 2001)

Cuz it's twice as fast 111 megs per second versus 55


----------



## elmer (Dec 19, 2002)

> Other than the obvious double the space on a simulated single drive,


Another concept to be aware of is that both drives can be accessed simultaneously, in parallel. This _may_ improve performance, depending on a few factors.

Also, some types of RAID use it for redundancy, so that even if one drive failed you could keep working seamlessly. Once a replacement drive is hot-plugged in it would be automatically regenerated from the data on the other drives, after which your redundancy would be in place again.


----------



## gnatsum (Apr 10, 2005)

really...


so, what if the info which is stored that i need happens to be on the sector which is on the the failed drive, it wont be destroyed?

also, can i raid a partition of a drive, to another drive?

and does that mean that two 80 gig drives will serve me better than 1 160 gig drive?


----------



## MacDoc (Nov 3, 2001)

You cannot partition a RAID set at the moment 
You need a secondary backup.

If you MIRROR you don't get the speed or the space - you do get perhaps overkill security.

I assume you are talking G5 tower.
A pair of 80s in Level 0 will be twice the speed of a single 160 drive.


----------



## CanadaRAM (Jul 24, 2005)

MacDoc said:


> Cuz it's twice as fast 111 megs per second versus 55


Not true.
See www.storagereview.com for lots of detail about why, in desktop single user usage patterns, a RAID 0 is no faster and can actually be slower than a single drive. In addition, you are constrained by both the drive controller and the RAID software. Two drives on a single ATA or SATA or Firewire controller are limited by the throughput of the controller and the buss. The software RAID used by Apple robs time from your CPU to calculate the distribution of data across the disks. If you had a RAID set up with hardware RAID controllers, and a separate buss for each drive, ($$$$) you would still not approach the 2x theoretical speed because of controller overhead and PCI buss limitations.

RAID - Redundant Array of Inexpensive Disks 

Redundancy (or mirroring) means that the data you write to the hard drives is stored with a backup so that if you suffer the loss of one drive in the array, you can reconstruct all of your data from the remaining drives.

Array means more than one drive working together and appearing to your machine as one storage device

Inexpensive related originally the difference in price between a group of 3 to 10 small hard drives and the expense of a single gigantic drive used in servers. This distinction is largely academic now.

The RAID function is controlled either by software or by a dedicated RAID controller card. There are two components of a RAID array; striping and redundancy (or mirroring). 

Striping takes your data and divides the bytes across two or more hard drives. The theory is that the writing and reading speed will be faster because as drive A is dealing with one byte, drive B is already getting a head start finding the next byte to read or write. This works because transferring the data takes only 20% of the time needed, the other 80% of the time the drive needs to move the heads and wait for the data on the disk to rotate around to the head. 

The simplest RAIDs are called RAID 0 (striping) and RAID 1 (mirroring)

RAID 0 simply uses two identical hard drives, and stripes the data between them to create a single volume. There is no redundancy, therefore if one drive has a failure, ALL the data is lost on both drives. Cheapest but risky. 2 x 100 Gb drives in RAID 0 = 200 Gb space

RAID 1 just means two drives, where data is written simultaneously to both. Drive B is a mirror of drive A. This provides good redunancy, at the expense of half or the drive space. 2 x 100 Gb in RAID 1 = 100 Mb space.

RAID 2 through 5 are various arrangements of 3 to 10 drives, where data is striped across the drives, but "parity" data is also stored, to be able to reconstruct any single drive. Typically one drive is consumed by the parity data, so
3 x 100 Gb drives in RAID = 200 Gb space
5 x 100 Gb drives in RAID = 400 Gb space

You can also combine RAIDs, such as a striped pair (RAID 0) mirrored by another identical striped pair (RAID 1), which is sometimes called RAID10 or RAID 1+0 or RAID 0+1
4 x 100 Gb drives in RAID 0+1 - 200 Gb space.

Bottom line: 
For desktop computer use, RAIDs are almost never worth it, unless you are doing something that needs massive data streaming, like video production.

There is an overhead to RAID in calculating where each byte of data is going to go. This means that RAIDs are slower than a single drive for everyday use. 

They only really shine when put under the loads of a server, or if you need a single volume that exceeds the size of available single drives.

RAID 0 is terribly risky unless you maintain a fulltime backup onto another drive. RAID 1 - 5 provide additional security but have significant costs for drives, controller cards, and drive enclosures. But remember that RAID 1 - 5 only protect against drive failure. If you delete a file, have a crash or get a virus, the damage is done instantaneously to the mirror as well as the primary data, so RAID gives you no protection against that.

Thanks
Trevor
CanadaRAM.com


----------



## ArtistSeries (Nov 8, 2004)

CanadaRAM said:


> RAID 0 is terribly risky unless you maintain a fulltime backup onto another drive.


Excellent post Trevor.
Now you know why MacDoc is always reminding us to backup.


----------



## gnatsum (Apr 10, 2005)

WOAH


okay, THAT explained EVERYTHING...i swear i can go teach a lesson on RAID now. 


anyway, thanks a lot.

this thread is done.

If anyone has a question about raid-ing a drive ask Trevor.

He knows it all. 


an no macdoc, it's no g5 tower. not by a longhorn, err. longshot. 

lol i was just thinking because some people were advertising raid two drives which they are selling for twice the speed. so i was just curious.




because i like speed.


----------



## groovetube (Jan 2, 2003)

if you like speed, raid. Screw redundancy.

that's what firewire+CCC is for.


----------



## elmer (Dec 19, 2002)

Trevor makes lots of good points. Here are some more:

RAID is a really cool, geeky thing to do to your system.
Anything that cool tends to suck money out of your wallet spontaneously, even if it does have the word "inexpensive" in the acronym.
Some system architectures are just crying out for RAID - high bandwidth interface to the drive, large premium for high capacity drives, overall performance potential which can be unlocked with a little boost ... ie. G5 PowerMac.



> For desktop computer use, RAIDs are almost never worth it, unless you are doing something that needs massive data streaming, like video production.


To be fair, apparently Macdoc has a lot of customers who need to do exactly that. And if he says he's seen a doubling of performance, I believe him. Performance is subjective - a lot of reviewers forget that.


----------



## CanadaRAM (Jul 24, 2005)

If you want extra speed, a simple and effective way is to divide your data files and your System onto different physical hard disks. That way, one disk can be reading and writing the scratch / virtual memory files, while the other drive only reads data. If you have room for 3 drives, divide them System, Applications, Data. 

If you are a total Photoshop or video nut, then dedicating a small fast SATA (WD Raptor) drive solely to scratch disk for those apps can help.


----------



## groovetube (Jan 2, 2003)

100 bucks and my system (G5) screamed. 'nuff said. 
but it does depend if you need the speed.


----------



## Macaholic (Jan 7, 2003)

Nice post, Trevor 

I'm one 1/2 hour show's writing away from unemployment on this series I've been doing. At that point, I plan on cleaning house on my drive (not really necessary, but I "feel" like starting fresh) and going from Panther to Tiger. During this process, I'm going to test my drives in RAID and non-RAIDed configs to see if I'm really getting an appreciable benefit. I did used to have separate slower drives on the ATA66 buss for booting/Apps and the other for media files (smaller sized files of my large sample library). Then, when I got these faster drives and bought the ATA133 card, I went (OS X software) RAID on it. I'm curious to see if it's still worth it, versus the risk of a striped RAID -- OR the dedicated NON-RAID drives on my dual channel ATA133 card.


----------



## MacDoc (Nov 3, 2001)

CR - that's old school and certainly not needed with the bandwidth the G5 offers.

All the G5 towers have dual SATA buses and the sustained read/write contiguous consistently shows twice the speed - not theoretical - tested - easily tested.
Tiger does an excellent job in keeping drives defragged and the speed shows.

In addition the i/o speed for the immense amount of file swapping that X engenders all the time. There is 5-6 gigs of drive space in use and the i/o speed helps as it harnesses both channels.

This architecture on G5s is a long ways away from the slow buses and bottlenecks of the past.
Remember we're talking bus speeds 1/2 of processor speeds and far and away the bottleneck is drive through put. Improve that and you improve the system response over all.

All we are doing is harnessing the same i/o speed that allows HiDef video work by adding a couple more sata drives.
i/o is i/o and Tiger keeps the files contiguous so the speed shows all the time.

As for potential failure - Seagate SATA drives have extremely low failure rates and run very cool ( hence the 5 year warranties ).
You do want to back up but that holds true for any drive system - daily or more frequent is best.
Real important the drives must be fully matched right down to the Firmware but the gains are easily seen - just run X-Bench or other drive testing software.
With Tiger the benefits are even clearer.
Remember the part of RAID is *I*nexpensive.

And 100 megs per second + IS inexpensive on a G5 tower - it's built in - use it.


----------



## gnatsum (Apr 10, 2005)

hmm...this is more interesting than i thought....

so it seems that RAID-ing the drives is not going to be THAT useful? since i don't do much high data load work, minimal fooling around on photoshop, and iMovie, and Garage band i can't use at all. 

it seems for me, that the real speed i need is processor speed. not Drive speed. drive speed seems decent enough for me really..what i'm really trying to do here is suck every bit of speed from this slowtooth machine i have here...


which reminds me, it's been 3 weeks, time for my diskwarrior, onyx, macJanitor routines!


----------



## Macaholic (Jan 7, 2003)

What hardware do you have?


----------



## TroutMaskReplica (Feb 28, 2003)

i think the best formula is system on own drive, and data and scratch discs on RAID. this would be for heavy photoshop work.

right now i have system, data, scratch discs on raid and its relatively slow. i move scratch discs to slow 2mb cache drive and speed improves dramtically. it would make even more sense to use the RAID for the scratch discs, since that is where the bulk of the disc access occurs (even with 2GB of RAM!!), and get the system onto a separate drive/bus.


----------



## MacDoc (Nov 3, 2001)

Processor speed is overrated as well. RAM is king for all aspects and video cards are visibly a good thing and help your CPU.
Tell us your equipment.

TM the data swapping for the system is enormous - just look at your Activity monitor.
Putting a small fast 8 meg cache drive for Photoshop partitioned to keep the cache files in the fastest part of the drive would make the most sense but on an MDD using the separate buses makes the most sense.
RAID on the back bus with the OS and apps single 8 meg cache drive on the front bus ( it's limited to 66 meg per second anyway )

Are you on Tiger.??


----------



## MACSPECTRUM (Oct 31, 2002)

gnatsum said:


> which reminds me, it's been 3 weeks, time for my diskwarrior, onyx, macJanitor routines!


3 weeks?
my oh my, you do like to live dangerously

for "normal" business use i recommend OnyX at least once per week


----------



## Macaholic (Jan 7, 2003)

I came across this install, called Anacron, that will regularly check for and perform all the cron tasks on its own.

Versiontracker entry here:
http://www.versiontracker.com/dyn/moreinfo/macosx/26808


----------



## Derrick (Dec 22, 2004)

Here's someone who used 4 'drives':

http://www.wrightthisway.com/Articles/000154.html

I am sure this has been on here before ... I thought someone might get a chuckle out of it


----------



## TroutMaskReplica (Feb 28, 2003)

> TM the data swapping for the system is enormous - just look at your Activity monitor.
> Putting a small fast 8 meg cache drive for Photoshop partitioned to keep the cache files in the fastest part of the drive would make the most sense but on an MDD using the separate buses makes the most sense.
> RAID on the back bus with the OS and apps single 8 meg cache drive on the front bus ( it's limited to 66 meg per second anyway )
> 
> Are you on Tiger.??


okay thanks. i'll try that. yes, i'm on tiger.


----------



## MacDoc (Nov 3, 2001)

Also make sure you have good head room on the drives. Drives are slowest as they fill up and even tho Tiger does a good job of defragging the files are not fully optimized so free space can get hacked up pretty quickly.


----------



## TroutMaskReplica (Feb 28, 2003)

that's a good point. the reason i'm moving things around is i didn't plan properly in the beginning and now my system drive is almost full. full system drive = unhappy machine. but i can fix it by using my drives differently and offloading some project files from the turn of the century onto DVD.


----------



## CanadaRAM (Jul 24, 2005)

MacDoc said:


> just run X-Bench or other drive testing software.


Therein lies the rub: XBench has only a passing resemblance to real-workld performance. 2 x benchmark does not equal 2 x user performance; in fact it may equate to 1:1 user performance (see the 128-bit memory test results in iMac G5s - 30% XBench improvement, 0% application improvement)

Performance benefit is all about usage patterns.

First and most obvious - have plenty of RAM so you don't pageout to the hard drive.

Second most important thing is: There is no second most important thing. It's nearly impossible to generalize whethe,r for a given person's application, CPU, Drive speed, RAID, or video card will be the next bottleneck. It all depends what you are doing. 

RAID systems absolutely do provide performance benefits -- in specific situations such as capturing HD video to disk, and in servers with 4+ users hitting the drive simultaneously. (And in synthetic benchmarks that test drives under continuous access conditions unlike any real use would be).

If you are doing Logic Audio with a bunch of software instruments and effects, then your limiting factor after RAM is brute CPU power.

If you are playing a first-person shooter game, the limiting factor after adequate RAM and adequate CPU power is the GPU on the videocard (not the RAM on the video card as many people assume) 

But single-user, desktop usage patterns don't make good use of the sustained throughput or the high volume request handling where RAIDs make their performance gains. 

Based on the conversations I have had with people who run studios of G5's, their biggest performance boost for Photoshop after getting RAM was to put in a 10,000 RPM Raptor drive as a scratch drive. Better than RAID.

You are quite correct in saying that the G5 has dual SATA 150 MB/s controllers, so each of the 2 internal SATA drives has a "direct line" to the Frontside buss. 

However, Macs use a single Firewire controller (notwithstanding having more than one Firewire connector on the back) and each IDE buss in a G4 supports 2 IDE hard drves through the same controller and 100 Mb/s or 66 Mb/s buss, which limits throughput. So RAID on IDE or Firewire is inherently controller and buss limited.


----------



## MacDoc (Nov 3, 2001)

ALL the different drive testing shows the same gains and if you tell me that then how would you defend your thesis since there is no "test" for real world performance according to you.
What IS hard to test and easy to see is the benefit of caching in drives - and having both caches in play also helps.

i/o is i/o and two buses in use helps - the overhead for the RAID is miniscule in a G5 envirnment.


----------



## CanadaRAM (Jul 24, 2005)

MacDoc said:


> ALL the different drive testing shows the same gains and if you tell me that then how would you defend your thesis since there is no "test" for real world performance according to you.


Didn't say there was no test, said that XBench values don't map to real world performance. 

BTW- I agree that caching has a large impact on drive performance, especially for typically single user usage with many small but localized or repeated requests. Ironically, when the cache can be exploited, the benefit of RAID is nullified...

StorageReview.com has done extensive RAID performance testing

Their conclusion:
"3. RAID helps multi-user applications far more than it does single-user scenarios. The enthusiasm of the power user community combined with the marketing apparatus of firms catering to such crowds has led to an extraordinarily erroneous belief that striping data across two or more drives yields significant performance benefits for the majority of non-server uses. This could not be farther from the truth! Non-server use, even in heavy multitasking situations, generates lower-depth, highly-localized access patterns where read-ahead and write-back strategies dominate. Theory has told those willing to listen that striping does not yield significant performance benefits. Some time ago, a controlled, empirical test backed what theory suggested. Doubts still lingered- irrationally, many believed that results would somehow be different if the array was based off of an SATA or SCSI interface. As shown above, the results are the same. Save your time, money and data- leave RAID for the servers!"

http://www.storagereview.com/articles/200406/20040625TCQ_5.html

Detailed discussion of RAID0 vs. independent disks in single-user environments:
http://forums.storagereview.net/index.php?showtopic=15912&st=100&p=173350&#entry173350


----------



## CanadaRAM (Jul 24, 2005)

Here's my provisional order of performance, assuming single user, mixed use and intense graphic arts applications:

1) More RAM
2) Good caching on-disk - 8 Mb or even 16 Mb 
3) Separate spindles for scratch, data, application, system (in that order)
4) Upgrade scratch drive to 10,000 RPM
5) RAID - for applications with high sustained writing and/or huge datasets (example HD video, statistics)


----------



## MacDoc (Nov 3, 2001)

Real world.
I just did these on my machine. 
Duplicate a 2.6 gig file - 2.39 on a single drive
Same thing on the RAID 1.45
Copy from the RAID to the single drive 1.30
Copy the other way 2.09 

i/o is i/o when dealing with g5 architecture and ESPECIALLY with OSX.

Even the average Mac user deals with tons of media files and other reasonably large files. The G5 Towers have the capacity - no harm at all in using it.
Anyone that HAS a tower likely deals with larger media anyway.

Is it useful elsewhere for the average user - not always - is it useful on a G5 tower?....you bet.


----------

