LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-02-2005, 09:59 PM   #1
GATTACA
Member
 
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209

Rep: Reputation: 32
RAID 0 users what's it like


Hello.

I've heard wonderful things from my co-workers about the speed boost they get from having a RAID 0/0+1 system.

I'm looking for some unbiased opinions. Is RAID 0/0+1 really worth the extra dough?
My primary (ie work-related) use for it would be for running database queries.

Now I understand that I'd get a performance boost in my queries but would I see an overall boost in the system's responsiveness on other tasks?

Thoughts?
 
Old 08-02-2005, 10:34 PM   #2
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 454

Rep: Reputation: 32
How big is the database? If the usual accesses are from cached stuff in RAM, there would be little advantage. It the thing is busy and the database is large, you should see an improvement that depends on blocksize. Reads could speed up n-fold if you have n drives striped and the data is large enough to cover overhead. Write speed will be slower but the system will likely hold off until a quiet moment and not cost much. If you have tiny blocks of data scattered about randomly, the RAID advantage is reduced to redundancy only because you are mostly seeking instead of transferring. A lot depends on how your database and drives are tuned.

In most cases, I would recommend RAID 1 for redundancy and parallel reads/writes if you are serving a lot of clients. More heads are better than few. Ideally, you should have one or more heads per client. That will always be faster than having a number of users waiting around for a fast read and then heads seeking together for the benefit of the next user. If you are sure you will be doing lots of writing or you need to wring out the last bit of speed, you could try 0+1. Usually, one expects data to be written once and read many times so the RAID 1 writing penalty is not great. My first choice would be to get enough RAM to hold everything, if possible.
 
Old 08-03-2005, 03:40 AM   #3
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
Just to add.

RAID 0 is just mirroring. So that's not very useful at all me thinks.

Raid 0+1 - I agree with the above. How large are your databases. How many users etc?
 
Old 08-03-2005, 04:31 AM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Incorrect RAID 0 is not mirroring. It is stripping. RAID 1 (mirroring) does parrallel reads but not writes.

Quote:
My first choice would be to get enough RAM to hold everything, if possible.
Gigabyte's I-RAM disk comes to mind. Add ram to it and then setup it in RAID 1 just in case the on-board battery dies. Unfortunately, it can only handle up to 4 GB.
 
Old 08-03-2005, 04:51 AM   #5
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
lol. oh yeah. back to unix school..........

nonetheless it depends on what you are using the disks for. Amount and type of I/O etc.

i've got an autoraid from a hp-ux box if you wanna buy that (12H)! RAID 10.........

just kidding......they do kick arse tho....
 
Old 08-03-2005, 10:21 AM   #6
GATTACA
Member
 
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209

Original Poster
Rep: Reputation: 32
Well my DBs aren't huge (64GB, 3GB, 21GB). I am the main (ie only) user 90% of the time. When some one else gets on the queries aren't that intensive.

I'm really not too interested in RAID for the DBs, I've just curious as to what kind of a performance boost I'll see in terms of day-to-day stuff.

My co-workers say that their workstations are more responsive overall since they use RAID 0+1. That's whats bugging me. I thought that if you aren't doing a lot of disk reading/writing the performance gained by RAID is minimal.
 
Old 08-03-2005, 11:11 AM   #7
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 454

Rep: Reputation: 32
Quote:
I am the main (ie only) user 90% of the time. When some one else gets on the queries aren't that intensive.
Bingo! Use RAID 0 and make sure you have adequate backups. If you can count on your backups, use ext2 filesystem instead of journalling, just for the database. Then you can get excellent acceleration: speed up in proportion to number of RAID 0 slices. Two drives gets you 100% speed up. Three gets you 300% and so on. Most motherboards would become the bottleneck at this point for 32bits. 64bit systems can go further. These numbers are if you are going all over the parttition randomly and with large volume. If you just whittle away here and there, the RAM cache will do most of the work. You could add some RAM. It's pretty cheap these days. Some people do a continuous database backup by replicating. You could replicate on a journalled RAID 1 set of drives...
 
Old 08-03-2005, 11:19 AM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
For database queries, you'll get the best performance from RAID1.

With two drives, RAID0 stripes (i.e. interleaves) data across the two drives. In order to read or write a piece of data, both drives need to access the same point on the drive. This means seek times are not improved, but read/write throughput is doubled. It also doubles overall capacity. RAID0 is good for transfering larger files quickly. It's particularly good for flipping through large image files quickly. However, for indexed database queries it is unlikely to produce much of a performance benefit.

With two drives, RAID1 mirrors the same data on both drives. In order to access a piece of data, the computer chooses whichever mirror has the read/write head nearest to that data and uses that one. This produces a good improvement in seek times, but does NOT produce an improvement in read/write speeds for a single file. However, it does allow for simultaneous reads/writes in different parts of a file. This is ideal for database queries, because a query often needs to access multiple parts of a database.

RAID1 has only half the capacity of RAID0 with two drives, but there's an additional benefit--redundancy. With RAID1, if one drive fails the data is still intact and fully accessable. For a typical database application, this durability is important!
 
Old 08-03-2005, 11:33 AM   #9
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
To explain a bit about indexed database queries--there is basically two different ways for a computer to perform a query. One is the brute force method of slogging through the entire file and processing the matching records. The other is to use indexes on common query criteria to fetch only potentially matching records.

The brute force method is rather low performance for a 64GB database. Even blazing away at 64megs/sec, that'd still take 16 minutes to perform a single query!

In contrast, real life indexed database queries rely on indexes that usually fit entirely within RAM. The computer can process the criteria which match indexed fields entirely within RAM, which makes it practically instantaneous most of the time. Then comes the part which takes a long time--waiting for the read heads to seek to the desired data. After that, the data is read off the drive, but unless your records are huge this doesn't take much time compared to the seek wait. That's why RAID1 will benefit your database queries while RAID0 more or less won't.
 
Old 08-03-2005, 11:39 AM   #10
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
The other advantage to RAID 1 not mentioned is there's very little degredation in performance if one drive fails, unlike RAID 5 which slows to a crawl if you pull a drive. Of course, for a very large databases the cost of RAID 1 would be prohibitive.
 
Old 08-03-2005, 10:23 PM   #11
GATTACA
Member
 
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209

Original Poster
Rep: Reputation: 32
Thanks everyone for their feed back.

Based upon the data provided, I most likely will not go with RAID just yet. I get the impression that for my needs I don't think it's worth the financial investment.

Maybe on my next linux box.
 
  


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
Raid Problem Fedora Core 3, RAID LOST DISKS ALWAYS icatalan Linux - Hardware 1 09-17-2005 03:14 AM
Perc3Di SCSI RAID + Adaptec 2810SA RAID = Fatal Grub Error? LinuxOnTheEdge Linux - General 2 03-19-2005 02:35 PM
does linux support the sata raid and ide raid in k7n2 delta ilsr? spyghost Linux - Hardware 10 04-16-2004 05:27 AM
moving system from ide software raid to new box with scsi raid ftumsh Linux - General 0 10-28-2003 09:34 AM
ABIT KR7A133-RAID MB - HPT372 RAID Controller jeb Linux - Hardware 3 05-07-2002 01:51 PM

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

All times are GMT -5. The time now is 02:57 PM.

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