[parted-devel] [PATCH 6/6] libparted: fix optimal IO alignment

Jim Meyering jim at meyering.net
Wed Dec 19 20:41:00 UTC 2012


Phillip Susi wrote:
> On 12/19/2012 11:45 AM, Jim Meyering wrote:
>> Phillip Susi wrote:
>>> Sure, take a 4 disk raid5 with 256k stripe factor.
>>
>> Am I misunderstanding something? 256k is both smaller than 1MiB and
>> *is* a power of 2. I was asking if you'd seen values *not* like
>> that.
>
> A 4 disk raid 5 with 256k stripe factor uses 256k from each of 3 disks
> ( 4th is parity ), giving a stripe width and thus an optimal alignment
> of 768k.

Ok, that makes sense.
Then what do you think about lowering the bar from 1MiB to 128KiB?
Maybe even 64KiB, I suppose.  Better safe than sorry.
Just look at how many people are still reporting problems
with parted 1.8, so many years later.

>> I guess it comes down to whether there are systems that return
>> bogus values there, and whether there are systems that return legit
>> values smaller < 1MiB, like I was asking about above.
>
> I'm not aware of any known bugs where the kernel returns inappropriate
> values, but there are plenty of raid configurations that do use < 1MiB
> and/or non power of two alignments.

I'm pretty sure those tests do actually serve some purpose.
Maybe Brian (Cc'd) knows for sure?
(Brian, this is about the use of PED_DEFAULT_ALIGNMENT, aka 1MiB
in commit c749046a54d983f74f8156c0aea71b0995b9477d)



More information about the parted-devel mailing list