3

We are building a raid-10 with LSI 9260-4i + 4 x Intel DC S3500 SDDs.

Partition alignment
From what I understand I need to start fdisk with -H32 -S32 or Ted T'so variant with -H224 -S56 in order to align the partitions to 512k and 128k respectively.

But what about file system alignment?

Normally I understand it's advisable to specify the stride and stripe width when running mke2fs.ext4.

But is it needed for hardware raid? Or because the hardware presents itself as a single storage device it's not needed?

Raid type: Raid 10 hardware Chunk size: probably 64kb File system block size: 4k Number of SSDs: 4 DC S3500 erase block: unknown (maybe 128k)

Thank you!

Andy B
  • 105
  • 2
  • 8

2 Answers2

2

For functionality, filesystem alignment is not needed; the various storage subsystem layers will figure it out.

For performance, filesystem alignment might be needed. While the various storage subsystem layers can ultimately figure it out, it's more work for them to do so, and sometimes that additional work translates into many extra and unnecessary reads/writes. The performance of SSD might mask the effect, but it's there nonetheless. For some situations this extra work can cause serious overhead and service degradation.

The fact that your hardware RAID is presenting a single storage device can actually make the alignment problem worse; most filesystems don't know how to interrogate proprietary hardware RAID interfaces to see the underlying disk layout, and consequently the filesystems will use defaults for stride/stripe/chunk that have no connection to the actual physical components.

Joshua Miller
  • 1,378
  • 2
  • 11
  • 14
  • So from what you're saying I take that alignment mkfs parameters are highly recommended. More specifically it seems the latest versions of MegaCli gives us the stripe size (not the stripe unit) and it defaults to 64kb. For raid-10 the correct alignment parameters would be `-E stride=32,stripe-width=64`? I am guessing the stride by dividing the stride size to the number of data bearing devices (from what I read the number of data bearing disks would be n/2 and we'll have a total of 4 devices). Have I understood it correctly? – Andy B Oct 29 '13 at 15:45
0

Yes, file system alignment matters, especially with RAID, and possibly even more with SSDs, to avoid unnecessary read and write amplification. Optimal alignment is workload dependent.

Disclosure: link above is to an article I wrote on this exact subject.

Gordan Bobić
  • 971
  • 4
  • 11