Friday 21 December 2012

That old chestnut: ALIGNMENT

Misaligned of partitions can cause severe performance issues. It is important to make sure that the alignment is correct before even touching mdadm. Remember, it can't be changed afterwards

Here is a good source that explains alignment with modern drives.
Linux on 4KB-sector disks: Practical advice

Another good explanation can be found here:
disk-performance-part-2-raid-layouts-and-stripe-sizing

Here is an example of a misaligned partition. The partition starts at sector 63.




Using parted we can get confirmation of the issue:



We are looking to align on multiples of the stripe size. If we select a stripe size of 512KB or in mdadm terms a chunk size of 512KB.

Note: This is not to be confused with stripe width which is derived from the stripe size, the number of load bearing disks, and the block size on the disk (4KB) We will set the stripe width when we create the partition.

No comments:

Post a Comment