Operating System - Linux
1827459 Members
4503 Online
109965 Solutions
New Discussion

which one is faster RAID-1 or RAID-5 ?

 
SOLVED
Go to solution
Maaz
Valued Contributor

which one is faster RAID-1 or RAID-5 ?

which one is faster RAID-1 or RAID-5 ?

which one is best for /var, /usr, /opt, and /home... Raid 1 or 5 ?
which one is best for /var/log... Raid 1 or 5 ?
which one is best for /var/log/maillog... Raid 1 or 5 ?

Regards
Maaz
13 REPLIES 13
Maaz
Valued Contributor

Re: which one is faster RAID-1 or RAID-5 ?

>which one is best for /var/log... Raid 1 or 5 ? -- Plz Dont Consider this Line
Steven E. Protter
Exalted Contributor
Solution

Re: which one is faster RAID-1 or RAID-5 ?

Shalom Maaz,

For the above mentioned files, it makes no difference at all. Those files are sequential access writes and are not edited or changed like a database.

On strictly performance database, Raid 1 is going to complete its writes faster than Raid 5, becuase physically the data needs to be written into more places Raid 5.

Any write intensive environment is going to get a performanc boost from Raid 1. The above mentioned files are simply not going to benefit that much.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Uwe Zessin
Honored Contributor

Re: which one is faster RAID-1 or RAID-5 ?

Unfortunately, it is not possible to reply with a single number, because one can construct I/O patterns for either RAID level to look 'better'.

On a modern storage controller with writeback cache there is often no big difference, so this is rather a cost/ maintanance decision.

- a RAID-1/RAID-0 set requires more disks than a RAID-5 set of equivalent size, so is less cost-effective

- a multiple-disk RAID-5 can provide better read performance than a 2-disk RAID-1

- a set of striped mirrors is easier to rebuild, because it only has to deal with two disks, while a RAID-5 rebuild often requires reading from all disks
.
Maaz
Valued Contributor

Re: which one is faster RAID-1 or RAID-5 ?

Thanks Dear Gurus for the nice help ;).

by the way, SEP which filesystems do u recommend to be RAID 1/5 ?

and is it possible to create 'Raid 1+5' ?

Regards
Maaz
Stuart Browne
Honored Contributor

Re: which one is faster RAID-1 or RAID-5 ?

I'm a fan of ReiserFS, as I've had little problems with it, and it's working quite well for me for a few hundred GB of storage space.

EXT3 is also an excellant choice, very stable.

1+5? Striping over mirrored pairs? It's not really an efficient way of using the available disk space, but if you're willing to use disks in such a manner, then there's things like raid 15 and 51.

http://www.pcguide.com/ref/hdd/perf/raid/levels/mult.htm

There's a decent discussion about the different netsted RAID levels here.

I'd suggest you look closer at raid 10 however, more efficient use of space, with good throughput.
One long-haired git at your service...
Maaz
Valued Contributor

Re: which one is faster RAID-1 or RAID-5 ?

Thanks Dear Stuart Browne for nice help

Regards
Maaz
Vincent Fleming
Honored Contributor

Re: which one is faster RAID-1 or RAID-5 ?

Hi;

Typically, /var, /usr, /opt, /home, and even /var/log/ will be either very random read/writes or such small block I/O that your RAID controller (assuming you're using hardware RAID) will not really be able to recognise their I/O as sequential.

So, RAID-1 is probably your best choice; RAID-10 would be better.

This is because RAID-5 is slower at small-block random writes.

However, I believe that RAID-5 provides a very good cost/performance balance, so it will typically be a good choice for most systems. If you really have a need for speed, the cost of a few more disks for use in a RAID-10 is worth the extra $$.

Good luck,

Vince
No matter where you go, there you are.
Steven E. Protter
Exalted Contributor

Re: which one is faster RAID-1 or RAID-5 ?

On Linux, I exclusively use ext3. It has many of the same journaling capabilities that make JFS/vxfs stable on HP-UX.

Journaled fielsystems are best able to recover from sudden system halts.

I don't mix Raid 1 and 5 by choice. I think that gives the worst of both worlds. Raid 10, wish is two mirror copies on top of striping, gives good performance but if I have my choice, I'd prefer two copies on two disks, preferably two controllers.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alan_152
Honored Contributor

Re: which one is faster RAID-1 or RAID-5 ?

Raid 1 will be faster if you duplex, but slower if you mirror.
Alan_152
Honored Contributor

Re: which one is faster RAID-1 or RAID-5 ?

Raid 1 will be faster if you duplex (assuming a pair of high-speed controllers, of course), but slower if you mirror (with just 1 controller).
Uwe Zessin
Honored Contributor

Re: which one is faster RAID-1 or RAID-5 ?

Sorry, Alan, I don't buy such a simple statement. What about a single controller that uses a writeback cache? That is one I/O for the host which is immediately confirmed.
.
Alan_152
Honored Contributor

Re: which one is faster RAID-1 or RAID-5 ?

It is a simple statement, based on a whole lot of theory (I forgot to mention that, sorry) and the base definitions. But, another thing to consider is that RAID1 doesn't have to deal with writing a whole bunch of parity bits like 5 does.

I personally don't see that writeback will make any difference in comparing Raid solutions where it will be either on in all solutions or off in all solutions (if you have it on in 1 solution and off in the competing solution, then shame on you :) ). In any case, I wouldn't enable writeback in any kind of mission critical I/O solution anyway.

Back to the original poster -- at least for /home, speed better not be the highest concern -- redundancy must be, or you'll have plenty of mad users. For /var/log, why bother having redundancy? That would be like doing daily backups of /tmp.
Maaz
Valued Contributor

Re: which one is faster RAID-1 or RAID-5 ?

thanks all for nice help