Linux software RAID 10 layouts performance: near, far and offset benchmark analysis

Written by Gionatan Danti on . Posted in Linux & Unix

User Rating:  / 31
PoorBest 

Sequential read/write speed

The first battery of tests is about sequential read/write speed, a discipline where platter-based disks traditionally show quite good results.

Let's start with read speed: 

RAID10 Sequential read speed

It seems that different layouts bring very different results! At low queue/thread count, the “far” layout is the winner, showing RAID0-like performance. However, ramp up threads and you see another picture, with the “offset” layout clearly on top. The default “near” setup seems in bad light here.

 

Now, write speed: 

RAID10 Sequential write speed

The curves are more similar now, but somewhat reversed: we see the “far” layout quite behind in single thread mode, but at “offset” level with high thread count. The “near” layout has a flatter curve, being superior in 1-thread scenario but inferior with over 4 threads.

Mixed (50% read – 50% write) results: 

RAID10 Sequential mixed (read/write) speed

All layouts perform similarly here.

Summarizing, the only significant differences are in sequential read test, were “offset” and “far” are clearly superior to “near” layout. However, sequential speed rarely are so important in the server world, as many workloads issue random I/O operations.

Comments   

 
#11 Eli Vaughan 2014-03-19 17:05
Without getting into the holy war of near/far/offset performance/rel iability...

You responded to someone that the option for creating said arrays used the "-p [layout]" option. however, i wanted to point out that (with a performance hit) you can use different options than simply near, far, offset. you can store multiple copies of the mirror (more then 2 mirrors) by simply specifying. this will help redundancy, at an obvious hit on performance.

--layout=n3 3 near copies
--layout=f3 3 far copies
--layout=o3 3 offset copies

Just a note. Great write up.
 
 
#12 Rüdiger Meier 2017-02-28 12:51
I wonder why you write for "near layout
"2x sequential read speed (sequential read access can be striped only over disks with different data)

Shouldn't it be possible to read blocks A,B,C,D also from 4 different disks?

I guess the far-layout advantage for sequential reads is because rotating disks are usually faster at the beginning of the disk. So when reading far-layout it's possible to only use the first half of each disk.

And here is maybe one disadvantage of far-layout: I guess it's not possible to make all disks larger (or smaller) to enlarge (or shrink) the array space without rebuilding the whole array. This should be no problem for near and offset.
 
 
#13 Gionatan Danti 2017-02-28 16:37
Quoting Rüdiger Meier:

Shouldn't it be possible to read blocks A,B,C,D also from 4 different disks?


Basically, the answer is NO, for two reasons:

1) the kernel md driver can dispatch a single, large read request to chunked/striped disks only. This means that the "mirror" drives (in a RAID10 setup) are not engaged by single sequential read requests. I just recently tested a 4-way RAID1 mirror and, while multiple concurrent random read requests scaled very well (4x the single drive result), single sequential read requests were no faster than single drive.

2) even if the kernel splits a single large request and dispatch its chunks to different mirrored drives (and it does NOT that), you had to consider that, due to how data are physically layed out on the disk platter, scaling would be much less than ideal. For example, lets consider how data on the first disks pair of a RAID10 "near" layout are placed:

DISK1: A B C D E F G H
DISK2: A B C D E F G H

If a request requires both A and B chunks, it can theoretically engage both disks (and I repeat: with current kernels this does NOT happen), with a corresponding increasing in throughput. However, if a subsequent request require C and D chunks, you had to consider that DISK1's heads MUST travel over the (redundant) B chunks, wasting potential bandwidth.

In short: while RAID1 near layout is very good for random reads, it fall short of offset/far for sequential reads. Anyway, random reads often are the most frequent access pattern, rather than large sequential IO.

Regards.
 

You have no rights to post comments