Is Read speed faster when 1 disk is failed on raid5 ?
Quoted 6 lines · Chris Siebenmann
At a guess: when RAID-5 is intact, the kernel must read the entire
stripe size worth of data to verify the parity. When a RAID-5 array has a dead disk, any intact data block can be handed to the application the moment it comes off the disk as there is no point in doing parity verification. (The kernel has to reconstruct the missing blocks, but most of the blocks are present and good.)
i thought raid5 was doing parity calculation when writing ? difference between rading from failed an intact raid5 is almost twice the speed (failed is doing 150MB/sec, intact is doing 80MB/sec)
Quoted 9 lines · On Tue, Oct 22, 2002 at 11:58:56AM +0200, [email protected] wrote:
Quoted 6 lines · Chris Siebenmann
At a guess: when RAID-5 is intact, the kernel must read the entire
stripe size worth of data to verify the parity. When a RAID-5 array has a dead disk, any intact data block can be handed to the application the moment it comes off the disk as there is no point in doing parity verification. (The kernel has to reconstruct the missing blocks, but most of the blocks are present and good.)i thought raid5 was doing parity calculation when writing ?
Correct. RAID-5 will not do parity calculation when reading. RAID-5 will give you availability but it will not give you integrity.
Quoted 2 lines
difference between rading from failed an intact raid5 is almost twice the speed (failed is doing 150MB/sec, intact is doing 80MB/sec)
I didn't follow the beginning of this thread, sorry. Is this SCSI?
Signature · 10 lines
................................................................ : [email protected] : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............: - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line · Jakob Oestergaard
I didn't follow the beginning of this thread, sorry. Is this SCSI?
Ide disks on 3ware 7850 using software raid5
Quoted 6 lines · On Tue, Oct 22, 2002 at 12:49:41PM +0200, [email protected] wrote:
Quoted 1 line · Jakob Oestergaard
I didn't follow the beginning of this thread, sorry. Is this SCSI?
Ide disks on 3ware 7850 using software raid5
Ok. Odd.
My first guess would be that it's some master/slave IDE issue - but you are probably running all your disks as masters (one disk per channel), right?
Other than that... Well, if the parity information is intact, the disks would need to skip the parity blocks when the array is read from sequentially. With a degraded array, the reads are all contiguous on the disks - this could be a difference perhaps??
What chunk size are you using? And can you try a chunk size that is an
order of magnitude bigger or smaller? (might take some time to test
this out).
For example, if you use a 4k chunksize (I don't think you do, if my last guess holds), then try 128k. If you are using 64k or above (which, again, if I am guessing correctly, is probably more like what you're using), then try 4k.
Signature · 10 lines
................................................................ : [email protected] : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............: - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
I had the similar result with IDE drives through hpt374 controller. Still don't understand why a degraded system has better read performance.
YQ
----- Original Message -----
From: "Jakob Oestergaard" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, October 22, 2002 3:24 AM
Subject: Re: Is Read speed faster when 1 disk is failed on raid5 ?
Quoted 28 lines · On Tue, Oct 22, 2002 at 12:49:41PM +0200, [email protected] wrote:
Quoted 6 lines · Jakob Oestergaard
Quoted 2 lines
I didn't follow the beginning of this thread, sorry. Is this SCSI?
Ide disks on 3ware 7850 using software raid5
Ok. Odd.
My first guess would be that it's some master/slave IDE issue - but you are probably running all your disks as masters (one disk per channel), right?
Other than that... Well, if the parity information is intact, the disks would need to skip the parity blocks when the array is read from sequentially. With a degraded array, the reads are all contiguous on the disks - this could be a difference perhaps??
What chunk size are you using? And can you try a chunk size that is an
order of magnitude bigger or smaller? (might take some time to test
this out).For example, if you use a 4k chunksize (I don't think you do, if my last guess holds), then try 128k. If you are using 64k or above (which, again, if I am guessing correctly, is probably more like what you're using), then try 4k.
Quoted 13 lines
--
................................................................
: [email protected] : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob Østergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Yiqiang Ding
I had the similar result with IDE drives through hpt374 controller. Still don't understand why a degraded system has better read performance.
Could you comment on the guesses I made below, relating to the chunk size?
Quoted 13 lines
Quoted 13 lines
Other than that... Well, if the parity information is intact, the disks would need to skip the parity blocks when the array is read from sequentially. With a degraded array, the reads are all contiguous on the disks - this could be a difference perhaps??
What chunk size are you using? And can you try a chunk size that is an
order of magnitude bigger or smaller? (might take some time to test
this out).For example, if you use a 4k chunksize (I don't think you do, if my last guess holds), then try 128k. If you are using 64k or above (which, again, if I am guessing correctly, is probably more like what you're using), then try 4k.
Signature · 10 lines
................................................................ : [email protected] : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............: - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Jakob,
I don't follow your guesses. Why do you think it may be related to chunk size? Anyway, I'm using 32K.
yq
----- Original Message -----
From: "Jakob Oestergaard" <[email protected]>
To: "Yiqiang Ding" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Monday, October 28, 2002 1:02 PM
Subject: Re: Is Read speed faster when 1 disk is failed on raid5 ?
Quoted 2 lines · Yiqiang Ding
Quoted 1 line
I had the similar result with IDE drives through hpt374 controller.
Still
Quoted 6 lines
Quoted 1 line
don't understand why a degraded system has better read performance.
Could you comment on the guesses I made below, relating to the chunk size?
Quoted 1 line
Quoted 1 line
Other than that... Well, if the parity information is intact, the
disks
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
would need to skip the parity blocks when the array is read from sequentially. With a degraded array, the reads are all contiguous on the disks - this could be a difference perhaps??
What chunk size are you using? And can you try a chunk size that is
an
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
order of magnitude bigger or smaller? (might take some time to test
this out).For example, if you use a 4k chunksize (I don't think you do, if my
last
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
guess holds), then try 128k. If you are using 64k or above (which, again, if I am guessing correctly, is probably more like what you're using), then try 4k.
Quoted 13 lines
--
................................................................
: [email protected] : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob Østergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Yiqiang Ding
Hi Jakob,
I don't follow your guesses. Why do you think it may be related to chunk size? Anyway, I'm using 32K.
Because in RAID-5, each disk will hold blocks like:
Disk 0: [parity] [data] [data] [parity] Disk 1: [data] [parity] [data] [data] Disk 2: [data] [data] [parity] [data]
So when reading blocks 0, 1, 2, 3, 4, ... from the array, we will do:
Read disk 1 block 0
Read disk 2 block 0
Read disk 0 block 1
Read disk 2 block 1
Read disk 0 block 2
Read disk 1 block 2
Read disk 1 block 3
Read disk 2 block 3
We can do read-ahead, but the access pattern for disk 0 is:
Block 1, block 2, block 4, ...
For disk 1:
Block 0, block 2, block 3, ...
etc...
So we introduce seeks, because of the parity blocks.
Seeking ruins performance.
In a degraded array, the kernel cannot skip the parity blocks, it must use them for calculating the lost data.
So my guess is, that this "penalty" actually turns out to be an optimization (if the chunk size is small - eg. the number of seeks introduced is large). We will do strictly sequential reads on all disks.
So tell me, have I been smoking something, or does this make sense? :)
Even better - measure degraded vs. non-degraded read performance on a RAID-5 array, first with chunk-size 4k, then 32k, then 128k, and post
the results here ;)
Signature · 10 lines
................................................................ : [email protected] : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............: - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Jakob,
Thanks for your kind explanation. Sounds pretty reasonable. I also have done some tests on raid5 with 4k and 128k chunk size. The results are as follows:
Access Spec 4K(MBps) 4K-deg(MBps) 128K(MBps)
128K-deg(MBps)
2K Seq Read 23.015089 33.293993 25.415035 32.669278 2K Seq Write 27.363041 30.555328 14.185889 16.087862 64K Seq Read 22.952559 44.414774 26.02711 44.036993 64K Seq Write 25.171833 32.67759 13.97861 15.618126
Some conclusions:
1. "Degraded" raid5 has better (sequential) read/write performances. The biggest difference is in 64k sequential read, almost doubled.
2. Bigger chunk size makes less difference between non-degraded and degraded RAID5. This is due to less seek penalty for bigger chunksize raid5 according to Jakob's theory.
3. Bigger chunk size makes worse write performance. Why? Maybe somebody can explain this.
YQ
----- Original Message -----
From: "Jakob Oestergaard" <[email protected]>
To: "Yiqiang Ding" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Monday, October 28, 2002 4:30 PM
Subject: Re: Is Read speed faster when 1 disk is failed on raid5 ?
Quoted 50 lines · Yiqiang Ding
Quoted 4 lines
Hi Jakob,
I don't follow your guesses. Why do you think it may be related to chunk size? Anyway, I'm using 32K.
Because in RAID-5, each disk will hold blocks like:
Disk 0: [parity] [data] [data] [parity] Disk 1: [data] [parity] [data] [data] Disk 2: [data] [data] [parity] [data]So when reading blocks 0, 1, 2, 3, 4, ... from the array, we will do:
Read disk 1 block 0
Read disk 2 block 0
Read disk 0 block 1
Read disk 2 block 1
Read disk 0 block 2
Read disk 1 block 2
Read disk 1 block 3
Read disk 2 block 3We can do read-ahead, but the access pattern for disk 0 is:
Block 1, block 2, block 4, ...
For disk 1:
Block 0, block 2, block 3, ...
etc...
So we introduce seeks, because of the parity blocks.
Seeking ruins performance.
In a degraded array, the kernel cannot skip the parity blocks, it must use them for calculating the lost data.
So my guess is, that this "penalty" actually turns out to be an optimization (if the chunk size is small - eg. the number of seeks introduced is large). We will do strictly sequential reads on all disks.
So tell me, have I been smoking something, or does this make sense? :)
Even better - measure degraded vs. non-degraded read performance on a RAID-5 array, first with chunk-size 4k, then 32k, then 128k, and post
the results here ;)
Quoted 13 lines
--
................................................................
: [email protected] : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob Østergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Yiqiang Ding
Hi Jakob,
Hello Ding,
Quoted 8 lines
Thanks for your kind explanation. Sounds pretty reasonable. I also have done some tests on raid5 with 4k and 128k chunk size. The results are as follows:
Access Spec 4K(MBps) 4K-deg(MBps) 128K(MBps)
128K-deg(MBps)2K Seq Read 23.015089 33.293993 25.415035 32.669278 2K Seq Write 27.363041 30.555328 14.185889 16.087862 64K Seq Read 22.952559 44.414774 26.02711 44.036993 64K Seq Write 25.171833 32.67759 13.97861 15.618126
Very interesting !
Quoted 9 lines
Some conclusions:
1. "Degraded" raid5 has better (sequential) read/write performances. The biggest difference is in 64k sequential read, almost doubled.
2. Bigger chunk size makes less difference between non-degraded and degraded RAID5. This is due to less seek penalty for bigger chunksize raid5 according to Jakob's theory.
3. Bigger chunk size makes worse write performance. Why? Maybe somebody can explain this.
I'm going wild-guessing on (3) here...
It could be, that while you are writing your file, a write smaller than your chunk size is scheduled by the VM (or something - I'm not exactly a block/VM interaction wizard) - so a 128k parity block is written out. Some time later, the rest of the parity block is scheduled for writing, and the same but recalculated 128k parity block is written out once again.
Neil, or anyone else with more kernel understanding than me, please
comment on that :)
A work-around for this, as I see it, would be to change the RAID-5 driver so that it - during *writing* only - internally works on 512 byte "sub-chunks" *no*matter* the actual chunk size on the array.
This does not break compatibility with existing RAIDs as I see it - no additional information is needed in the superblock either. I think this optimization could be done completely transparently.
I'd love to come up with a patch, but there's a zero likelihood of that happening before the weekend.
Signature · 10 lines
................................................................ : [email protected] : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............: - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html