Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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...
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!
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.