Considering RAID Performance on mkfs Command

Introduction

When researching RAID technology, I ran into many concerns regarding performance considerations at multiple levels of storage, including the filesystem. After some research, I found that when creating a filesystem using the mkfs command, the parameters stride and stripe-width can be passed to help the filesystem better accommodate the RAID configuration reads and writes for improved performance.

How it works

I have a RAID 60 configured with a 1MB stripe over 8 drives using the default 4096 (4kB) chunk size. This would lead to the following filesystem create parameters for an ext4 filesystem:

mkfs.ext4 -E stride=256,stripe-width=2048

I omitted the “-b 4096” parameter for block size since my system defaults this. Always verify this with your system since the stride and stripe-width parameters are calculated using this.

The stride is 256 blocks of the 4096 (4kB) size block. Multiply the two values to get the resulting 1MB stripe size. This is the size of a single stripe per drive. The stripe-width is 2048 blocks of the 4096 (4kB) size block. Again, multiply the two values to get the resulting 8MB stripe-width size. This is the size of a single stripe times the number of drives in the array. This value is the total size required for a write to hit one stripe on all drives in the array of a write.

Conclusion

Although this seems straightforward, I always emphasize testing of your settings to ensure they are optimal for your setup, and any unknown anomalies are accounted for. For assistance in the calculation of the stride and stripe-width values, visit the following:

http://busybox.net/~aldot/mkfs_stride.html

Good luck!

Leave a Reply