VERY slow raid 5 - why?

Caintommy

Distinguished
Mar 19, 2006
29
0
18,530
0
Background:
I've had two disks in raid 0 for a while. They were lightning fast.
One of them started to crash. I got some service on the machine and it's now returned to me with three disks in raid 5.

Problem:
The disks now seem amazingly slow. I tested by copying a file of the size 700mb from one folder to another and it took five minutes!!
I also notice how slow it is when changeing song in my winamp playlist. It takes a swhole econd for each song to display in the playlist. So after changing song it takes about 40 seconds for the playlist to visually update.

Something is obviously wrong. I don't know anything about raids but surely this is not OK.

Any thoughts is appriciated, thanks!
 

Caintommy

Distinguished
Mar 19, 2006
29
0
18,530
0
it's now returned to me with three disks in raid 5.
Why aren't you asking this question of the people who performed unauthorized modifications to your system?

Sorry, I forgot to explain that I requested this modification.

I had originally planned to add a 3rd drive and do this but I never got around to it. Then when one of the drives started to fail I panicked and fortunately this company could save the data and add a 3rd.

I've contacted them and told them about my problem. It will take days until I get a reply though and on the off chance that I can fix this myself I wanted to consult with you guys here in this amazing forum.
 

Caintommy

Distinguished
Mar 19, 2006
29
0
18,530
0
what is the controller?
I don't know what that means...

However, looking around in my windows to see what's change I find something called Silicon Image ATA Controller. That might be what you're referring too?

When looking at the Hardware properties of my C: I see "Silmage SCSI Disk Device". If that's useful at all...
 

darkangelism

Distinguished
Oct 31, 2006
196
0
18,680
0
ok, yeah thats what im talking about, it is a motherboard raid controller which is software based, so raid 5, wont perform well because the parity calculations are done by the main system processor.
 

yourmothersanastronaut

Distinguished
Mar 23, 2006
1,150
0
19,280
0
RAID 5 works best on a dedicated RAID controller.

Part of the problem could also be that they tried to change the striped array into a RAID level 5 array. I'm not sure what they did, but if you want to try RAID 5, I'd suggest backing up your data, reformatting, and reinstall everything on a RAID 5 array that you started from scratch.

If that doesn't work, get a RAID card. Newegg has some nice PCI SATA RAID cards for a reasonable price.
 

Caintommy

Distinguished
Mar 19, 2006
29
0
18,530
0
ok, yeah thats what im talking about, it is a motherboard raid controller which is software based, so raid 5, wont perform well because the parity calculations are done by the main system processor.
Aha, that makes sense.
But it worked perfectly as a raid 0.
Were there no parity calculations then?
 

gse1

Distinguished
Dec 13, 2006
76
0
18,630
0
ok, yeah thats what im talking about, it is a motherboard raid controller which is software based, so raid 5, wont perform well because the parity calculations are done by the main system processor.
Aha, that makes sense.
But it worked perfectly as a raid 0.
Were there no parity calculations then?

RAID 0 doesn't actually give you any redundancy so parity information doesn't even come into it. With RAID 0 all that happens is your data is split between two disks, so you get two disks reading and writing at once, hence the performance increase. RAID 0 is actually more failure prone than using a single disk because if either disk fails you lose your entire file system.

With RAID 5, whenever you write to disks the system also has to calculate parity information for the third disk whenever you write, which is why write performance is particularly bad with RAID 5 systems. Even on dedicated hardware RAID controllers you can have a multiple disk RAID 5 system and the write speeds won't approach what you can achieve on a single disk.

On a desktop system RAID 5 is a total waste of time. If you've got three disks I'd recommend you use the first 2 for a RAID 0 setup and use the third disk to backup data using some kind of automatic tool.
 

Caintommy

Distinguished
Mar 19, 2006
29
0
18,530
0
On a desktop system RAID 5 is a total waste of time. If you've got three disks I'd recommend you use the first 2 for a RAID 0 setup and use the third disk to backup data using some kind of automatic tool.
That sounds clever!

I was told that raid 5 would be just as fast as raid 0, but safer.
If this is not true, even with a raid card, then I think I'll do as you suggest.
 

gse1

Distinguished
Dec 13, 2006
76
0
18,630
0
I was told that raid 5 would be just as fast as raid 0, but safer.
I'm afraid whoever told you that was just plain wrong.

If this is not true, even with a raid card, then I think I'll do as you suggest.
I've found Abakt to be useful for the backup tooling. Good luck with the config!
 

darkstar782

Distinguished
Dec 24, 2005
1,375
0
19,280
0
With a high end RAID5 controller that does XOR calculations itself, a 3 disk RAID5 array should be just as fast as a two disk RAID0 array.

On a basic controller however, a 4 disk RAID 0/1 array will be faster on reads than a 2 disk RAID 0, and about the same speed on writes, but obviously requires your to buy another disk.
 

gse1

Distinguished
Dec 13, 2006
76
0
18,630
0
With a high end RAID5 controller that does XOR calculations itself, a 3 disk RAID5 array should be just as fast as a two disk RAID0 array.
I have LSI RAID controllers with hardware XOR calculations in a 5 disk + hot spare configuration and it is still slower on physical writes than a single modern SATA disk. However, the onboard cache speeds things up considerably until it gets full, which might be why you believe this configuration is faster than it really is.

On a basic controller however, a 4 disk RAID 0/1 array will be faster on reads than a 2 disk RAID 0, and about the same speed on writes, but obviously requires your to buy another disk.
You may be correct but you may also start hitting limits with bus speeds with more than 2 disks. Plus, if you consider your basic RAID controller to be an onboard RAID controller, you will start getting significant overhead on your CPU.

My advice is to keep it simple.
 

bga

Distinguished
Mar 20, 2006
272
0
18,780
0
With a high end RAID5 controller that does XOR calculations itself, a 3 disk RAID5 array should be just as fast as a two disk RAID0 array.
I have LSI RAID controllers with hardware XOR calculations in a 5 disk + hot spare configuration and it is still slower on physical writes than a single modern SATA disk.

Then something is terribly wrong. 5 disk RAID 5 with a dedicated controller should beat a single disk any day. My own experience and the tests I have seen all confirm this. I would say the choice depends on what you want to achieve. If you want to do RAID for desktop performance - then don't. RAID 0 is simply to dangerous (do you really always remember to backup?), and RAID 5 expensive for the performance gained.
If you need the capasity on the desktop, then by all means do RAID5 with a dedicated controller with hardware accelleration (use PCI-E 4x or 8x) (Also remember that SAS RAID controllers also can do RAID with SATA disks). Use at least 4 drives, and use as many to fullfill your space needs. A friend has 2 * 2TB RAID5 arrays in his desktop. And they perform very well - much better than any single drive ever did. When transferring data from his Raptor systemdrive unto one of the arrays, the Raptor is clearly the bottleneck.
 

gse1

Distinguished
Dec 13, 2006
76
0
18,630
0
Then something is terribly wrong. 5 disk RAID 5 with a dedicated controller should beat a single disk any day. My own experience and the tests I have seen all confirm this.
Well my real world experience in the enterprise tells me otherwise. RAID 5 with 5 disks does offer better read performance but write performance which is RAID 5's weakest point is hard pushed to match a single disk. It may well do better under larger arrays (i.e. 10 or 15 disks) but for a small number of disks a single drive will write quicker. Besides which RAID 5 with 3 disks will "always" be slower then RAID 0 with two disks. With 2 disk RAID 0 you have to split the data in 2 and write to 2 disks, with 3 disk RAID 5 you have to split the data in 2, add parity data and then write to 3 disks in a striped pattern. RAID 5 with 3 disks is purely extra overhead and will always be slower!

I would say the choice depends on what you want to achieve. If you want to do RAID for desktop performance - then don't. RAID 0 is simply to dangerous (do you really always remember to backup?), and RAID 5 expensive for the performance gained.
Your advice boggles me:

- RAID 0 is perfectly acceptable if you have a decent backup strategy. If you setup and automatic routine that runs once a week or requires a mouse lick then the fallibility of RAID 0 is perfectly acceptable
- RAID 5 is not a high performing system. You should never implement RAID 5 for performance. If you want performance and redundancy you should implement RAID 01 or RAID 10. You will never get decent performance from RAID 5 on a non-dedicate controller and even with a dedicated controller you are talking major expense.

If you ever deal with enterprise level database systems you will see that people like Oracle, Informix, etc.. describe RAID 5 is being a very slow file system for databases and this is precisely because of the poor write performance.

A friend has 2 * 2TB RAID5 arrays in his desktop. And they perform very well - much better than any single drive ever did. When transferring data from his Raptor systemdrive unto one of the arrays, the Raptor is clearly the bottleneck.
Unsurprising as you are reading from the RAID 5 array.
 

proof

Distinguished
Oct 16, 2006
1,620
0
19,790
1
They seem slow because RAID0 is for performance which you were used to and RAID5 is for redundancy which is not performance. It is faster than no RAID but slower than RAID0.
 

Fedor

Distinguished
Feb 11, 2007
238
0
18,680
0
A friend has 2 * 2TB RAID5 arrays in his desktop. And they perform very well - much better than any single drive ever did. When transferring data from his Raptor systemdrive unto one of the arrays, the Raptor is clearly the bottleneck.
Unsurprising as you are reading from the RAID 5 array.

Um, he said from the Raptor TO an array, which means the array is writing.
 

bga

Distinguished
Mar 20, 2006
272
0
18,780
0
RAID 5 with 5 disks does offer better read performance but write performance which is RAID 5's weakest point is hard pushed to match a single disk. It may well do better under larger arrays (i.e. 10 or 15 disks) but for a small number of disks a single drive will write quicker. Besides which RAID 5 with 3 disks will "always" be slower then RAID 0 with two disks.
A friend has 2 * 2TB RAID5 arrays in his desktop. And they perform very well - much better than any single drive ever did. When transferring data from his Raptor systemdrive unto one of the arrays, the Raptor is clearly the bottleneck.
Unsurprising as you are reading from the RAID 5 array.


I said I was transferring FROM his Raptor UNTO the array. So the Raptor Reads and the RAID5 writes. And yes, I do not recommend 3 disk RAID5, but 5 disk RAID5 should perform much better than any single drive (read or write) and also beat a two disk RAID0. You don't need 10-15 disk arrays to have decent performance. If your experience is different, something else bottlenecks your system (controller, bus, blocksize etc.)

I would say the choice depends on what you want to achieve. If you want to do RAID for desktop performance - then don't. RAID 0 is simply to dangerous (do you really always remember to backup?), and RAID 5 expensive for the performance gained.
Your advice boggles me:

- RAID 0 is perfectly acceptable if you have a decent backup strategy. If you setup and automatic routine that runs once a week or requires a mouse lick then the fallibility of RAID 0 is perfectly acceptable

I don't find the increased risk of RAID0 acceptable. Systems should be reliable first, fast second. Do you always remember to backup your desktop, every day/week? Anyway, I don't ever recommend RAID0.

- RAID 5 is not a high performing system. You should never implement RAID 5 for performance. If you want performance and redundancy you should implement RAID 01 or RAID 10. You will never get decent performance from RAID 5 on a non-dedicate controller and even with a dedicated controller you are talking major expense.
I have both implemented and seen exellent performing RAID5 systems, and it's the best compromise between speed and cost, when large capacity is needed.
Yes, it needs a dedicated controller (and there is not a big difference in price between a good SATA RAID and a SAS RAID controller), and you need at least 5 disks (which can be SATA). So let me repeat: RAID5 is does not have good price/performance for desktop - except when you anyways need a lot of capasity.

If you ever deal with enterprise level database systems you will see that people like Oracle, Informix, etc.. describe RAID 5 is being a very slow file system for databases and this is precisely because of the poor write performance.
I do work with large SAS arrays, and I have never heard any database companies recommend against RAID5, if there are enough disks. And write performance is excellent with a good controller. Yes, Raid 10 is even faster, but it costs a lot in disks.
 

proof

Distinguished
Oct 16, 2006
1,620
0
19,790
1
Google does not use RAID. Instead they have three backups for each HDD. They say that a RAID5 array of enterprise level SAS drives offers too high a risk of failure. It may seem cost in-effective at first, but when you consider the amount of money something as big as Google loses when a server failsyou begin to see that it makes sense. Sorry for the thread hijack but I just felt like throwing this in.
 

bga

Distinguished
Mar 20, 2006
272
0
18,780
0
Google does not use RAID.
The software running Google is a very special distributed system (which I do admire). Designed for using many redundant cheaper systems instead of fewer, larger and more reliable (and much more expensive) systems.
In the end they have a more scalable and reliable total system, but it does need very specialized software, and it is not something you can implement generally.
 

gse1

Distinguished
Dec 13, 2006
76
0
18,630
0
Um, he said from the Raptor TO an array, which means the array is writing.
Oh yes, so he did, my bad. Very interesting this is then! So how could you tell the Raptor was the bottleneck? And did you take into any controller cache? I'm quite interested in this.

I said I was transferring FROM his Raptor UNTO the array. So the Raptor Reads and the RAID5 writes. And yes, I do not recommend 3 disk RAID5, but 5 disk RAID5 should perform much better than any single drive (read or write) and also beat a two disk RAID0. You don't need 10-15 disk arrays to have decent performance. If your experience is different, something else bottlenecks your system (controller, bus, blocksize etc.)
Are you sure you're taking into account the drive cache? I find write speeds are lightning fast until the cache fills up and then things slow down considerably as the disk subsystem strains to keep up.

I don't find the increased risk of RAID0 acceptable. Systems should be reliable first, fast second. Do you always remember to backup your desktop, every day/week? Anyway, I don't ever recommend RAID0.
Well, personally I have a network filesystem available and I make sure that I write all data I want to keep on that. But an automated routine is perfectly adequate, where's the hardship in scheduling a backup routine or double clicking a desktop icon every so often to do a backup?

Whether a system should be reliable first or not depends on what the system is for!

I have serious doubts whether a 5 disk RAID 5 system will beat two disk RAID 0 for write performance. For pete's sake it's all on the original post. This guy has 2 disks in RAID 0 and it was lightning fast and then had 3 disk RAID 5 and it was dog slow. Same hardware, different setup, and it's slower, that's what you'll get with any controller. RAID 0 will beat RAID 5, I challenge you to find some statistics or benchmarks that say otherwise!

Here's some sources that highlight the poor performance of RAID 5.

http://www.dbazine.com/datawarehouse/dw-articles/rittman8:
"RAID 5 can severely affect performance on highly updated databases."

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/iodesign.htm
When describing RAID 5:
"Sequential reads benefit the most, while write performance can suffer."
"Recent RAID 5 implementations avoid many of the traditional RAID 5 limits by installing large amounts of battery-backed memory (NVRAM)."

http://www.oracle-base.com/articles/misc/RAID.php?display_type=printable
This documents recommends the use of combinations of RAID 0 and RAID 1 over RAID 5 in all cases except where money needs to be saved.

http://www.dba-oracle.com/oracle_tips_raid5_bad.htm
Finally this documents highlights the flaws of RAID 5 for database performance and highlights that the recent advance that makes RAID5 viable in such situations is the onboard cache

And here's one more I added after my original post from Wikipedia
http://en.wikipedia.org/wiki/Raid_5#RAID_5
This just gives a general good overview about what I've been saying. In particular the RAID 5 Performance section backs up what I've been saying that whilst RAID 5 read performance is decent, "almost as good as RAID 0 for the same number of disks," the write performance is poor.
 

sandmanwn

Distinguished
Dec 1, 2006
915
0
18,990
1
Raid 5 with 3 disks is the slowest possible configuration for raid 5.

If you are going to run raid 5 you will need a much larger array.

Take it back and have the reconfigure for raid 0.
 

ASK THE COMMUNITY