LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-23-2006, 09:53 AM   #1
GATTACA
Member
 
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209

Rep: Reputation: 32
RAID 0 risk assesment


Hello

This question is to all of you linux users who have your OS on setup in a RAID 0 configuration.

I've heard the arguments for why you should never build a box with your OS on a RAID 0 setup. While I see the logic to this, how often have you exprienced a hardware failure that has cost you all your data?

I've got a box with 2 drives in it that has been formatted 100's of times and the drives still work fine (however the disks are not used in a RAID).
So for you RAID 0 users out there, how do you deal with this potential danger? Does the RAID 0 config automatically reduce hardware stability?

Thanks.
 
Old 03-23-2006, 05:57 PM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Raid0 doesn’t increase the chance of a drive failing any more than running a Raid1 or Raid5. It’s just that the chance of at least one drive failing has doubled in a 2-drive Raid0 (well, a little more than doubled, to be exact). You probably need to add in the probability of the controller failing, too.

So, Yes, a Raid0 is more unstable than a single drive setup, but it’s a risk that can be calculated.

I have never experienced a drive failure in Raid0, but I am extremely picky about my drives (Western Digital) and test them extensively with the manufacturer’s diagnostics before using them.

I did have a power supply fail once that tricked me into thinking a Raid0 had failed, but replacing the power supply fixed the problem.

**********

To guard against a Raid0 failure (or at least to speed up recovery), I install an extra drive for occasionally backing up either just the core OS or the entire installation. At least if it crashes, you don’t have to start over and reinstall everything.

But being realistic, whatever you have on a Raid0 should be expendable and easily rebuilt. You can say that for a single drive setup, too.

One past use I implemented a Raid0 for was a local linux update mirror. Since it was being backed up weekly to a non-raid drive, recovery and getting back up-to-date would have been fairly fast after a failure. And could it sling those updates out!

The other implementations were typically to either breathe some life back into old systems or to breathe some life back into old drives. Two old ATA/66 drives in a Raid0 can function a lot like a new drive.

You can always go out and buy a Raptor to speed up a system, but that’s cheating.
 
Old 03-23-2006, 10:07 PM   #3
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
A lot people do not understand the difference between accessing time and throughput. Everybody thinks throughput is the only value to look at. This is not true. For an OS such as Linux, you want the lowest accessing time. A hard drive like Western Digital's Raptor series hard drive is the best hard drive to use as the OS drive because it has an access time between 4 to 6 milliseconds. You are not cheating when using it. Using RAID level 0 for an OS drive is stupid because it doubles your chances of the OS failing when booting and while running. Also RAID level 0 will not improve the accessing time when loading programs. RAID level 1 should be used as the OS drive because it has the ability to access two or more files at once instead of one at a time. RAID level 0 should only be used for video recording, sound recording, scanning photos at the highest DPI. RAID level 0 can not improve the speed of a 15 megabyte file because a single hard drive can easily send that out in one second.


-- RAID-0 --
Pros:
Increases read and write throughput
Increases disks space

Cons:
Doubles the chances of losing data.
Accessing is the same a single drive.
Boot loader needs to be stored on a non-RAID partition


-- RAID-1 --
Pros:
Improves/decreases accessing time
Half the chance of losing data compared to using one drive
Boot loader can be installed on each drive to increase your chance of booting up Linux.

Cons:
A little expensive
Throughput is the same a single hard drive
Boot loader may get confused of the copies


-- RAID-10 --
Pros:
Increases throughput performance
Improves/decreases accessing time
Increases disk space
Can have two adjacent disks fail

Cons:
Costly


The accessing time gets effected by hard drive latency, controller, bus, software, etc. IBM/Hitachi and Western Digital has low latency. Maxtor and Seagate has medium-high latency.

The journaled filesystems can add parity like information to RAID arrays by setting the journal on another drive.
 
Old 03-24-2006, 08:21 AM   #4
GATTACA
Member
 
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209

Original Poster
Rep: Reputation: 32
Basically I'm trying to "breath new life into an aging machine" as WhatsHisName suggested (the workstation in questoin is a PIII @ 933Mhz). I've heard differing arguments about RAID 0, all of them have been raised here. However, Electro's comments is new to me. Electro, are you saying that if I want to increase the systems responsiveness I should actually use RAID 1?
 
Old 03-24-2006, 11:01 PM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Yep, RAID-1 should decrease the time to boot up and to load programs.
 
Old 03-25-2006, 02:54 PM   #6
GATTACA
Member
 
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209

Original Poster
Rep: Reputation: 32
My knowledge of RAID is very limited. Could you explain why RAID 1 would be faster? As I understand it, in RAID 1 the disk is mirrored. If that's the case what makes it faster? Shouldn't it be as fast as a non-RAID computer?
 
Old 03-25-2006, 04:09 PM   #7
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The reason why I said RAID-1 is better for an OS is because it can access two or more files at the same time instead of one at a time like RAID-0. This is because RAID-1 arrays can handle two or more reading queues at the same time since there are two or more copies of the files. RAID-0 can only handle one read/write queue at a time. RAID-1 can only write one queue at a time, so /var, /tmp, and other directories that get constantly written should not be included on a RAID-1 array.

The term fast for hard drives depends on the application the hard drive will be used for. There are two categories of fast. One is access time and the other is throughput or megabytes per second. A lot of review sites only state throughput which is only part of the term fast. Access time is the time it takes to move the read/write head to the section where data is located. Access time has latency added to it, so the access time ranges between 15 to 60 milliseconds.

Two hard drives that have an access time of 9 ms setup as RAID-1 can have the same reading time as one Western Digital Raptor hard drive. However, write performance of RAID-1 is the same as single hard drive, but if RAID-10 (RAID-1 and RAID-0) is used or even better RAID-15 (RAID-1 and RAID-5) is used, the write performance can be improve.
 
Old 03-27-2006, 08:57 PM   #8
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
GATTACA: You’ve heard a lot of ideas to digest. Some were facts and some were opinions.

What’s missing is some speculation as to how software Raid0 and Raid1 using common PATA/SATA drives would actually perform on your “underpowered” non-hyperthreaded, single CPU system. Having run systems like yours in both configurations, I can absolutely assure you that both will cause your system to have a faster feel than just using a single disk.

One place that I’ve noticed a significant difference between software Raid0 and Raid1 on “underpowered” systems is web browsing, where the Raid0 setup felt much faster than the Raid1 setup. But the only way to find out which will work best for you is to actually set both up with small installations and test them.

If you were running a high-power server with a large storage array, predicting which would run faster for a given application would be somewhat easy, but for your situation, there is no black-and-white answer as to which one will best fits your needs. But almost without a doubt, it will be a cold day in hell before the Raid1 setup outruns the Raid0 setup on your hardware. I say this from experience with systems like yours.

For the Raid0 setup, my only suggestion on a system like yours is to keep the chunk size small (8-16K). Also, you might want to look into the Bonnie++ ( http://www.coker.com.au/bonnie++ ) and/or IOzone ( http://www.iozone.org ) utilities to help you evaluate how well each Raid setup works and to give you some hard numbers to look at. IOzone is very helpful for looking at the effects on both small and large reads/writes, but it takes a while to understand the output.

BTW, it isn’t stupid to use a Raid0 with a doubled risk of failure. It all depends on your tolerance of risk. After all, if we always took the path of least risk, then we would all be driving Volvos and living extremely dull lives.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which one is the biggest risk? shanenin Slackware 16 03-24-2006 08:50 PM
is this a security risk? shanenin Linux - Security 8 11-02-2003 04:27 PM
Will a RISK Processor Run on Linux, PA-RISK 8500 at 400MHz CPU IBNETMAN79 Linux - General 2 03-08-2002 07:09 PM
Will a RISK Processor Run Linux, PA-RISK 8500 CPU IBNETMAN79 Linux - Newbie 1 03-08-2002 06:49 PM
Will A RISK CPU Run Linux, HP PA-RISK 8500 CPU IBNETMAN79 General 0 03-08-2002 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration