public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance
@ 2014-02-24  6:27 Facundo Curti
  2014-02-24  7:24 ` Kerin Millar
  2014-02-24 17:03 ` Jarry
  0 siblings, 2 replies; 4+ messages in thread
From: Facundo Curti @ 2014-02-24  6:27 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

Hi. I am again, with a similar question to previous.

I want to install RAID on SSD's.

Comparing THEORETICALLY, RAID0 (stripe) vs RAID1 (mirrior). The performance
would be something like this:

n= number of disks

reads:
  raid1: n*2
  raid0: n*2

writes:
  raid1: n
  raid0: n*2

But, in real life, the reads from raid 0 doesn't work at all, because if
you use "chunk size" from 4k, and you need to read just 2kb (most binary
files, txt files, etc..). the read speed should be just of n.

On the other side, I read over the net, that kernel don't support
multithread reads on raid1. So, the read speed will be just n. Always. ¿It
is true?

Anyway, my question is. ¿Who have the best read speed for the day to day?
I'm not asking about reads off large files. I'm just asking in the "normal"
use. Opening firefox, X, regular files, etc..

I can't find the guide definitive. It allways are talking about
theoretically performance, or about "real life" but without benchmarks
or reliable data.

Having a RAID0 with SSD, and following [2] on "SSD Stripe Optimization"
should I have the same speed as an RAID1?

My question is because i'm between. 4 disks raid1, or RAID10 (I want
redundancy anyway..). And as "raid 10" = 1+ 0. I need to know raid0
performance to take a choice... I don't need write speed, just read.

¿Anyone knows the true about this? ¿Somebody tried this?

Thanx a lot.!! Bytes! ;)

[1]http://www.pcstats.com/articleview.cfm?articleid=890&page=5
[2]
http://www.overclock.net/t/484367/guide-all-you-ever-wanted-to-know-about-raid

[-- Attachment #2: Type: text/html, Size: 2402 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance
  2014-02-24  6:27 [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance Facundo Curti
@ 2014-02-24  7:24 ` Kerin Millar
  2014-02-24 17:03 ` Jarry
  1 sibling, 0 replies; 4+ messages in thread
From: Kerin Millar @ 2014-02-24  7:24 UTC (permalink / raw
  To: gentoo-user

On 24/02/2014 06:27, Facundo Curti wrote:
> Hi. I am again, with a similar question to previous.
>
> I want to install RAID on SSD's.
>
> Comparing THEORETICALLY, RAID0 (stripe) vs RAID1 (mirrior). The
> performance would be something like this:
>
> n= number of disks
>
> reads:
>    raid1: n*2
>    raid0: n*2
>
> writes:
>    raid1: n
>    raid0: n*2
>
> But, in real life, the reads from raid 0 doesn't work at all, because if
> you use "chunk size" from 4k, and you need to read just 2kb (most binary
> files, txt files, etc..). the read speed should be just of n.

While the workload does matter, that's not really how it works. Be aware 
that Linux implements read-ahead (defaulting to 128K):-

# blockdev --getra /dev/sda
256

That's enough to populate 32 pages in pagecache, given that PAGESIZE is 
4K on i386/am64.

>
> On the other side, I read over the net, that kernel don't support
> multithread reads on raid1. So, the read speed will be just n. Always.
> ¿It is true?

No, it is not true. Read balancing is implemented in RAID-1.

>
> Anyway, my question is. ¿Who have the best read speed for the day to
> day? I'm not asking about reads off large files. I'm just asking in the
> "normal" use. Opening firefox, X, regular files, etc..

For casual usage, it shouldn't make any difference.

>
> I can't find the guide definitive. It allways are talking about
> theoretically performance, or about "real life" but without benchmarks
> or reliable data.
>
> Having a RAID0 with SSD, and following [2] on "SSD Stripe Optimization"
> should I have the same speed as an RAID1?

I would highly recommend conducting your own benchmarks. I find sysbench 
to be particularly useful.


>
> My question is because i'm between. 4 disks raid1, or RAID10 (I want
> redundancy anyway..). And as "raid 10" = 1+ 0. I need to know raid0
> performance to take a choice... I don't need write speed, just read.

In Linux, RAID-10 is not really nested because the mirroring and 
striping is fully integrated. If you want the best read performance with 
RAID-10 then the "far" layout is supposed to be the best [1].

Here is an example of how to choose this layout:

# mdadm -C /dev/md0 -n 4 -l 10 -p f2 /dev/sda /dev/sdb /dev/sdc /dev/sdd

Note, however, that the far layout will exhibit worse performance than 
the "near" layout if the array is in a degraded state. Also, it 
increases seek time in random/mixed workloads but this should not matter 
if you are using SSDs.

--Kerin

[1] http://neil.brown.name/blog/20040827225440


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance
  2014-02-24  6:27 [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance Facundo Curti
  2014-02-24  7:24 ` Kerin Millar
@ 2014-02-24 17:03 ` Jarry
  2014-02-24 18:50   ` Facundo Curti
  1 sibling, 1 reply; 4+ messages in thread
From: Jarry @ 2014-02-24 17:03 UTC (permalink / raw
  To: gentoo-user

On 24-Feb-14 7:27, Facundo Curti wrote:

> n= number of disks
>
> reads:
>    raid1: n*2
>    raid0: n*2
>
> writes:
>    raid1: n
>    raid0: n*2
>
> But, in real life, the reads from raid 0 doesn't work at all, because if
> you use "chunk size" from 4k, and you need to read just 2kb (most binary
> files, txt files, etc..). the read speed should be just of n.

Definitely not true. Very rarely you need to read just one small file.
Mostly you need many small files (i.e. compilation) or a few big files
(i.e. database). I do not know what load you expect, but in my case
raid0 (with SSD) gave me about twice the r/w speed on heavily-loaded
virtualization platform with many virtual machines. And not only speed
is higher, but also IOPS are splitted to two disks (nearly doubled).

I did some testing with 2xSSD/512GB in raid1, 2xSSD/256GB in raid0 and
3xSSD/256GB in raid5 (I used 840/pro SSD with quite good HW-controller
but I think with mdadm it might be similar). Raid0 was way ahead of
other two configurations in my case.

Finally I went for 4xSSD/256GB in raid10 as I needed both speed and
redundancy...

Jarry

-- 
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance
  2014-02-24 17:03 ` Jarry
@ 2014-02-24 18:50   ` Facundo Curti
  0 siblings, 0 replies; 4+ messages in thread
From: Facundo Curti @ 2014-02-24 18:50 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]

Thank you all! :) I finally have all clear.
I'm going to do raid 10. Any way, I'm going to do a benchmark before to
install.

Thank you!;)


2014-02-24 14:03 GMT-03:00 Jarry <mr.jarry@gmail.com>:

> On 24-Feb-14 7:27, Facundo Curti wrote:
>
>  n= number of disks
>>
>> reads:
>>    raid1: n*2
>>    raid0: n*2
>>
>> writes:
>>    raid1: n
>>    raid0: n*2
>>
>> But, in real life, the reads from raid 0 doesn't work at all, because if
>> you use "chunk size" from 4k, and you need to read just 2kb (most binary
>> files, txt files, etc..). the read speed should be just of n.
>>
>
> Definitely not true. Very rarely you need to read just one small file.
> Mostly you need many small files (i.e. compilation) or a few big files
> (i.e. database). I do not know what load you expect, but in my case
> raid0 (with SSD) gave me about twice the r/w speed on heavily-loaded
> virtualization platform with many virtual machines. And not only speed
> is higher, but also IOPS are splitted to two disks (nearly doubled).
>
> I did some testing with 2xSSD/512GB in raid1, 2xSSD/256GB in raid0 and
> 3xSSD/256GB in raid5 (I used 840/pro SSD with quite good HW-controller
> but I think with mdadm it might be similar). Raid0 was way ahead of
> other two configurations in my case.
>
> Finally I went for 4xSSD/256GB in raid10 as I needed both speed and
> redundancy...
>
> Jarry
>
> --
> _______________________________________________________________
> This mailbox accepts e-mails only from selected mailing-lists!
> Everything else is considered to be spam and therefore deleted.
>
>

[-- Attachment #2: Type: text/html, Size: 2267 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-24 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-24  6:27 [gentoo-user] RAID 1 vs RAID 0 - Read perfonmance Facundo Curti
2014-02-24  7:24 ` Kerin Millar
2014-02-24 17:03 ` Jarry
2014-02-24 18:50   ` Facundo Curti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox