All of lore.kernel.org
 help / color / mirror / Atom feed
* raid 10f2 vs 1 on 2 drives
@ 2012-05-22 19:33 William Thompson
  2012-05-22 22:36 ` David Brown
  0 siblings, 1 reply; 8+ messages in thread
From: William Thompson @ 2012-05-22 19:33 UTC (permalink / raw)
  To: linux-raid

I understand that raid 10 f2 is slower on writes due to the location of the
2nd copy.  My question is, if lots of writes are performed, could this
layout wearout the drives quicker than raid 1?

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

* Re: raid 10f2 vs 1 on 2 drives
  2012-05-22 19:33 raid 10f2 vs 1 on 2 drives William Thompson
@ 2012-05-22 22:36 ` David Brown
  2012-05-23 11:25   ` William Thompson
  0 siblings, 1 reply; 8+ messages in thread
From: David Brown @ 2012-05-22 22:36 UTC (permalink / raw)
  To: William Thompson; +Cc: linux-raid

On 22/05/12 21:33, William Thompson wrote:
> I understand that raid 10 f2 is slower on writes due to the location of the
> 2nd copy.  My question is, if lots of writes are performed, could this
> layout wearout the drives quicker than raid 1?

No, wear is not going to be significantly different.

You didn't say whether you are talking about hard disks (where location 
makes a difference, but "wear" on the drive motor is insignificant to 
the disk's expected lifetime), or flash disks (where people often worry 
about "wear", though location is irrelevant and wear is also irrelevant 
for most uses of all but the most cheapo disks).


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

* Re: raid 10f2 vs 1 on 2 drives
  2012-05-22 22:36 ` David Brown
@ 2012-05-23 11:25   ` William Thompson
  2012-05-25 19:03     ` Bill Davidsen
  0 siblings, 1 reply; 8+ messages in thread
From: William Thompson @ 2012-05-23 11:25 UTC (permalink / raw)
  To: David Brown; +Cc: linux-raid

On Wed, May 23, 2012 at 12:36:12AM +0200, David Brown wrote:
> On 22/05/12 21:33, William Thompson wrote:
> >I understand that raid 10 f2 is slower on writes due to the location of the
> >2nd copy.  My question is, if lots of writes are performed, could this
> >layout wearout the drives quicker than raid 1?
> 
> No, wear is not going to be significantly different.
> 
> You didn't say whether you are talking about hard disks (where

Sorry about that (Chief).  Yes, I was refering to hard drives.

> location makes a difference, but "wear" on the drive motor is
> insignificant to the disk's expected lifetime), or flash disks

I was thinking about how much more head movement there would be to write the
2nd copy of the data.

> (where people often worry about "wear", though location is
> irrelevant and wear is also irrelevant for most uses of all but the
> most cheapo disks).

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

* Re: raid 10f2 vs 1 on 2 drives
  2012-05-23 11:25   ` William Thompson
@ 2012-05-25 19:03     ` Bill Davidsen
  2012-05-25 19:40       ` Roberto Spadim
  2012-05-26 16:07       ` David Brown
  0 siblings, 2 replies; 8+ messages in thread
From: Bill Davidsen @ 2012-05-25 19:03 UTC (permalink / raw)
  To: Linux RAID; +Cc: William Thompson

William Thompson wrote:
> On Wed, May 23, 2012 at 12:36:12AM +0200, David Brown wrote:
>> On 22/05/12 21:33, William Thompson wrote:
>>> I understand that raid 10 f2 is slower on writes due to the location of the
>>> 2nd copy.  My question is, if lots of writes are performed, could this
>>> layout wearout the drives quicker than raid 1?
>>
>> No, wear is not going to be significantly different.
>>
>> You didn't say whether you are talking about hard disks (where
>
> Sorry about that (Chief).  Yes, I was refering to hard drives.
>
>> location makes a difference, but "wear" on the drive motor is
>> insignificant to the disk's expected lifetime), or flash disks
>
> I was thinking about how much more head movement there would be to write the
> 2nd copy of the data.
>
There _is_ no extra head motion. The location of consecutive blocks is different 
on each drive, but as I read the mapping function the distance between blocks on 
the same drive will be about the same, so amount of head motion (both number and 
distance) is the same on each drive, but the location of that motion is not the 
same.

One drive may be seeking at the outer edge of the platter while another seeks 
near the spindle, but there's the same amount of seeking on each.


-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

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

* Re: raid 10f2 vs 1 on 2 drives
  2012-05-25 19:03     ` Bill Davidsen
@ 2012-05-25 19:40       ` Roberto Spadim
  2012-05-26 16:07       ` David Brown
  1 sibling, 0 replies; 8+ messages in thread
From: Roberto Spadim @ 2012-05-25 19:40 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Linux RAID, William Thompson

in my tests with a mysql and similar database scenarios where write /
read are near 50% / 50% (many updates/inserts and many selects) the
best raid is 1
where scenario is 10%write / 90% read
raid 10far is better (if not degraded or out of sync)


just two scenarios to help 'what's better'  question

2012/5/25 Bill Davidsen <davidsen@tmr.com>:
> William Thompson wrote:
>>
>> On Wed, May 23, 2012 at 12:36:12AM +0200, David Brown wrote:
>>>
>>> On 22/05/12 21:33, William Thompson wrote:
>>>>
>>>> I understand that raid 10 f2 is slower on writes due to the location of
>>>> the
>>>> 2nd copy.  My question is, if lots of writes are performed, could this
>>>> layout wearout the drives quicker than raid 1?
>>>
>>>
>>> No, wear is not going to be significantly different.
>>>
>>> You didn't say whether you are talking about hard disks (where
>>
>>
>> Sorry about that (Chief).  Yes, I was refering to hard drives.
>>
>>> location makes a difference, but "wear" on the drive motor is
>>> insignificant to the disk's expected lifetime), or flash disks
>>
>>
>> I was thinking about how much more head movement there would be to write
>> the
>> 2nd copy of the data.
>>
> There _is_ no extra head motion. The location of consecutive blocks is
> different on each drive, but as I read the mapping function the distance
> between blocks on the same drive will be about the same, so amount of head
> motion (both number and distance) is the same on each drive, but the
> location of that motion is not the same.
>
> One drive may be seeking at the outer edge of the platter while another
> seeks near the spindle, but there's the same amount of seeking on each.
>
>
> --
> Bill Davidsen <davidsen@tmr.com>
>  "We have more to fear from the bungling of the incompetent than from
> the machinations of the wicked."  - from Slashdot
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Roberto Spadim
Spadim Technology / SPAEmpresarial
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: raid 10f2 vs 1 on 2 drives
  2012-05-25 19:03     ` Bill Davidsen
  2012-05-25 19:40       ` Roberto Spadim
@ 2012-05-26 16:07       ` David Brown
  2012-05-26 23:41         ` Bill Davidsen
  1 sibling, 1 reply; 8+ messages in thread
From: David Brown @ 2012-05-26 16:07 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Linux RAID, William Thompson

On 25/05/12 21:03, Bill Davidsen wrote:
> William Thompson wrote:
>> On Wed, May 23, 2012 at 12:36:12AM +0200, David Brown wrote:
>>> On 22/05/12 21:33, William Thompson wrote:
>>>> I understand that raid 10 f2 is slower on writes due to the location
>>>> of the
>>>> 2nd copy. My question is, if lots of writes are performed, could this
>>>> layout wearout the drives quicker than raid 1?
>>>
>>> No, wear is not going to be significantly different.
>>>
>>> You didn't say whether you are talking about hard disks (where
>>
>> Sorry about that (Chief). Yes, I was refering to hard drives.
>>
>>> location makes a difference, but "wear" on the drive motor is
>>> insignificant to the disk's expected lifetime), or flash disks
>>
>> I was thinking about how much more head movement there would be to
>> write the
>> 2nd copy of the data.
>>
> There _is_ no extra head motion. The location of consecutive blocks is
> different on each drive, but as I read the mapping function the distance
> between blocks on the same drive will be about the same, so amount of
> head motion (both number and distance) is the same on each drive, but
> the location of that motion is not the same.
>
> One drive may be seeking at the outer edge of the platter while another
> seeks near the spindle, but there's the same amount of seeking on each.
>
>

That's not the case for "far" layout.  When you write a block, it there 
will be two copies - one in the first half of one disk (say, disk 1), 
and the other in the second half of the other disk (disk 2).  The next 
sequential block will be written to the first half of disk 2, and the 
second half of disk 1 - exactly half a disk away from the first block. 
And no matter where the disk head ends up after the write, raid10,far 
will always read from the outer half of the disk since it is 
significantly faster.  (For SSDs it doesn't matter, but then neither 
does head positioning.)

Write merging, combining, re-ordering, etc., will minimise this effect, 
as will write caches.  But there is no doubt that raid10,far sacrifices 
write speed a little in order to get the fastest possible read speeds. 
For most use-cases, with more reading than writing, this results in the 
best overall speed.


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

* Re: raid 10f2 vs 1 on 2 drives
  2012-05-26 16:07       ` David Brown
@ 2012-05-26 23:41         ` Bill Davidsen
  2012-05-27  0:46           ` keld
  0 siblings, 1 reply; 8+ messages in thread
From: Bill Davidsen @ 2012-05-26 23:41 UTC (permalink / raw)
  To: David Brown; +Cc: Linux RAID, William Thompson

David Brown wrote:
> On 25/05/12 21:03, Bill Davidsen wrote:
>> William Thompson wrote:
>>> On Wed, May 23, 2012 at 12:36:12AM +0200, David Brown wrote:
>>>> On 22/05/12 21:33, William Thompson wrote:
>>>>> I understand that raid 10 f2 is slower on writes due to the location
>>>>> of the
>>>>> 2nd copy. My question is, if lots of writes are performed, could this
>>>>> layout wearout the drives quicker than raid 1?
>>>>
>>>> No, wear is not going to be significantly different.
>>>>
>>>> You didn't say whether you are talking about hard disks (where
>>>
>>> Sorry about that (Chief). Yes, I was refering to hard drives.
>>>
>>>> location makes a difference, but "wear" on the drive motor is
>>>> insignificant to the disk's expected lifetime), or flash disks
>>>
>>> I was thinking about how much more head movement there would be to
>>> write the
>>> 2nd copy of the data.
>>>
>> There _is_ no extra head motion. The location of consecutive blocks is
>> different on each drive, but as I read the mapping function the distance
>> between blocks on the same drive will be about the same, so amount of
>> head motion (both number and distance) is the same on each drive, but
>> the location of that motion is not the same.
>>
>> One drive may be seeking at the outer edge of the platter while another
>> seeks near the spindle, but there's the same amount of seeking on each.
>>
>>
>
> That's not the case for "far" layout.  When you write a block, it there will 
> be two copies - one in the first half of one disk (say, disk 1), and the other 
> in the second half of the other disk (disk 2).  The next sequential block will 
> be written to the first half of disk 2, and the second half of disk 1 - 
> exactly half a disk away from the first block. And no matter where the disk 
> head ends up after the write, raid10,far will always read from the outer half 
> of the disk since it is significantly faster.  (For SSDs it doesn't matter, 
> but then neither does head positioning.)
>
He was talking about head motion on write, or I was at any write. Although the 
writes go to different parts of the platter, they are platters on different 
drives. So for any large sequential write, the head motion is the same (in 
distance), but occurs at the outside of one platter and the inside of the other. 
We're saying the same thing. A the read will not always happen at the outer edge 
unless both drives are idle, otherwise if one is busy the other will be used. To 
do otherwise would limit the performance when many reads to adjacent sectors 
take place.

> Write merging, combining, re-ordering, etc., will minimise this effect, as 
> will write caches.  But there is no doubt that raid10,far sacrifices write 
> speed a little in order to get the fastest possible read speeds. For most 
> use-cases, with more reading than writing, this results in the best overall 
> speed.
>


-- 
Bill Davidsen<davidsen@tmr.com>
   We are not out of the woods yet, but we know the direction and have
taken the first step. The steps are many, but finite in number, and if
we persevere we will reach our destination.  -me, 2010




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

* Re: raid 10f2 vs 1 on 2 drives
  2012-05-26 23:41         ` Bill Davidsen
@ 2012-05-27  0:46           ` keld
  0 siblings, 0 replies; 8+ messages in thread
From: keld @ 2012-05-27  0:46 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: David Brown, Linux RAID, William Thompson

On Sat, May 26, 2012 at 07:41:55PM -0400, Bill Davidsen wrote:
> David Brown wrote:
> >On 25/05/12 21:03, Bill Davidsen wrote:
> >>William Thompson wrote:
> >>>On Wed, May 23, 2012 at 12:36:12AM +0200, David Brown wrote:
> >>>>On 22/05/12 21:33, William Thompson wrote:
> >>>>>I understand that raid 10 f2 is slower on writes due to the location
> >>>>>of the
> >>>>>2nd copy. My question is, if lots of writes are performed, could this
> >>>>>layout wearout the drives quicker than raid 1?
> >>>>
> >>>>No, wear is not going to be significantly different.
> >>>>
> >>>>You didn't say whether you are talking about hard disks (where
> >>>
> >>>Sorry about that (Chief). Yes, I was refering to hard drives.
> >>>
> >>>>location makes a difference, but "wear" on the drive motor is
> >>>>insignificant to the disk's expected lifetime), or flash disks
> >>>
> >>>I was thinking about how much more head movement there would be to
> >>>write the
> >>>2nd copy of the data.
> >>>
> >>There _is_ no extra head motion. The location of consecutive blocks is
> >>different on each drive, but as I read the mapping function the distance
> >>between blocks on the same drive will be about the same, so amount of
> >>head motion (both number and distance) is the same on each drive, but
> >>the location of that motion is not the same.
> >>
> >>One drive may be seeking at the outer edge of the platter while another
> >>seeks near the spindle, but there's the same amount of seeking on each.
> >>
> >>
> >
> >That's not the case for "far" layout.  When you write a block, it there 
> >will be two copies - one in the first half of one disk (say, disk 1), and 
> >the other in the second half of the other disk (disk 2).  The next 
> >sequential block will be written to the first half of disk 2, and the 
> >second half of disk 1 - exactly half a disk away from the first block. And 
> >no matter where the disk head ends up after the write, raid10,far will 
> >always read from the outer half of the disk since it is significantly 
> >faster.  (For SSDs it doesn't matter, but then neither does head 
> >positioning.)
> >
> He was talking about head motion on write, or I was at any write. Although 
> the writes go to different parts of the platter, they are platters on 
> different drives. So for any large sequential write, the head motion is the 
> same (in distance), but occurs at the outside of one platter and the inside 
> of the other. We're saying the same thing. A the read will not always 
> happen at the outer edge unless both drives are idle, otherwise if one is 
> busy the other will be used. To do otherwise would limit the performance 
> when many reads to adjacent sectors take place.
> 
> >Write merging, combining, re-ordering, etc., will minimise this effect, as 
> >will write caches.  But there is no doubt that raid10,far sacrifices write 
> >speed a little in order to get the fastest possible read speeds. For most 
> >use-cases, with more reading than writing, this results in the best 
> >overall speed.

Well, the far layout will allways read from the outer sectors, to avoid some 
performance problems with disks with slightly different characteristics. 
The only case where the far layout will not read from the outer sectors, is when
the array is degraded.


best regards
keld

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

end of thread, other threads:[~2012-05-27  0:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 19:33 raid 10f2 vs 1 on 2 drives William Thompson
2012-05-22 22:36 ` David Brown
2012-05-23 11:25   ` William Thompson
2012-05-25 19:03     ` Bill Davidsen
2012-05-25 19:40       ` Roberto Spadim
2012-05-26 16:07       ` David Brown
2012-05-26 23:41         ` Bill Davidsen
2012-05-27  0:46           ` keld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.