[Nottingham] RAID stripe size?

notlug notlug at pendinas.org.uk
Thu Sep 29 11:28:00 UTC 2011


On 29/09/11 12:01, Martin wrote:
> Sergiusz,
>
> On 29 September 2011 11:10, Sergiusz Pawlowicz <sergiusz at pawlowicz.name> wrote:
>> and another post, sorry :)
>>
>> stripe size is pretty well explained at
>> http://tldp.org/HOWTO/Software-RAID-0.4x-HOWTO-8.html - par. 8
> Thanks for that one... Long forgotten! Unfortunately, it is rather
> dated in using ext2 examples!...
>
> A good explanatory part is:
>
> ###
> <snip>
>
> times)...
>
> So... Is the read-modify-write the highest performance penalty now?

That will depend on how you configure your disk, RAID and FS.
The default extN FS blocksize is 4096.
If your disk is has 4k blocks and your RAID/FS are set up:

Start of disk|<---512 bit boot sector--><--- RAID or filesystem blocks--->

With 512 bit disk blocks this didn't matter too much but with 4k blocks
the misalignment leaves you doing 2 disk block operations for every filesystem block
operation.

If on the other hand you align things nicely:
Start of disk|<---512 bit boot sector--><--- 3584 bit gap---><--- RAID or filesystem blocks--->

you lose a tiny amount of space but are back to doing 1 disk block operation per filesystem block operation.

If you want performance then it is important to align file system blocks to RAID block to disk blocks.

/Theodore Tso wrote a useful article on alignments for SSD/ [1] but it appears to be hidden
behind a linuxfoundation  need to authorization these days.  You may find a copy elsewhere
in the intertubes.

There may be some mileage in making the RAID stripe size an integer multiple of the disk
read-ahead buffer or mapping it to the disk cache configuration but I've not tested this myself.

[1]http://www.linuxfoundation.org/news-media/blogs/browse/2009/02/aligning-filesystems-ssd%E2%80%99s-erase-block-size

Have fun,
Duncan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/nottingham/attachments/20110929/3bfb8d81/attachment-0001.htm>


More information about the Nottingham mailing list