Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3178

RAID10, f2 - Working on arm5/Debian/GoFlex Net (no replies)

$
0
0
I've finally had the time and application to try out RAID10,f2 and done enough testing to say that "it works" on GoFlexNet ... but why bother ?

RAID0 is potentially fast, but you're f***ed if there's a disk error ... it's basically for performance, not for data you care about like a rootfs or your favourite music ...

RAID1 is safe, stores two copies of the data, you can lose a whole drive and still keep your data. There's potentially a small performance gain in reads, but it's negligible.

RAID10 can be done on two drives, but performance doesn't offer much of an increase, so why bother with more complexity over RAID1.

RAID5 and 6 need 3 or more drives. They are also CPU intensive because of the constant need to calculate parity. They do potentially offer some performance increase, but complexity in a breakdown scenario could be an issue. Also RAID5 and 6 in my experience puts more "strain" on the drives, which could lead to earlier failure.

So enter RAID10, f2 which can be done on two drives. Read and write performance are allegedly faster than a single drive or RAID1, read performance close to RAID0 ... RAID10 is a combination of RAID0 and RAID1. The performance advantage come on a two drive setup with the "f2" part, which best if you read online explanations yourself, not particularly exciting ... in essence it means that data can be read faster off of RAID10,f2 setup than anything else (on 2 drives) than RAID0.

Here's a performance comparison :

RAID type      sequential read     random read    sequential write   random write
   Ordinary disk       82                 34                 67                56
   RAID0              155                 80                 97                80
   RAID1               80                 35                 72                55
   RAID10,n2           79                 56                 69                48
   RAID10,f2          150                 79                 70                55


(source: https://raid.wiki.kernel.org/index.php/Performance )

My basic performance tests using dd command, have me with very similar performance to the above chart 111 read and around 50-70 write. I think dd is a sequential test, so you'll have to report back your findings for random tests !

So, I wanted to report I have RAID10,f2 working on GoFlexNet on 2xSeagate 1TB backup plus drives. I've only been running for a couple of days, so I can't comment on longevity, just yet ... but it works and I seem to be getting the best of both worlds, safe, plus a little increased performance.

The other consideration on a network attached device is the network speed. Marvell aren't known for producing the world's best ethernet controllers. I've also read that bodhi has fixed a checksum offloading issue in one of his latest kernels. This as I remember (with Marvell ethernet controllers) means that the ethernet controller offloads calcs onto CPU (checksum offloading). One of my laptops has a Marvell ethernet controller and it does put a high load on CPU, and the connection although gigabit runs like a dog - haven't been able to fix, yet. So fast disk internally to the device doesn't necessarily mean fast over-the-network transfers, there are other factors in play !

I use samba at the moment, and have achieved 20 MB/s read and write with my previous config (RAID1) ... early indicators are the RAID10,f2 is a little faster ... I'm still using davygravy's 3.3 kernel, so don't know if bodhi's 3.16 or 3.17 would be faster ... also NFS is reportedly less CPU intensive and might be faster way of sharing ... will have another go with NFS when I get the time ...

If you want to know more about RAID10,f2 check wikipedia's RAID page and also this link - https://raid.wiki.kernel.org/index.php/Preventing_against_a_failing_disk which also talks about how to use RAID on linux to make a system more robust (bonus)

Cheat sheet for mdadm is also invaluable - http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/ ... mdadm is fairly straightforward with the cheat sheet !

Final note, for swap partitions, I just created identical partitions and did 2x swapon commands (don't forget to add to fstab). From what I understand the Debian kernel does it's own internal RAID0 on these partitions, so no need to setup RAID for swap.

Cheers

DC

Viewing all articles
Browse latest Browse all 3178

Trending Articles