Filesystem Tuning
XFS is currently the recommended filesystem. It can achieve up to 3x the performance of a tuned ext2/ext3 solution. At this time, there is no know additional tuning for running XFS in a single- or multi-ioDrive configuration
Enabling Discard (aka Trim) Support with ext4
Enabling discard/trim/unmap capabilities under Linux requires the following things:
- Version 1.2.5 or later of the driver
- Linux kernel version 2.6.28 or later
- The ext4 filesystem
Discard capabilities are automatically enabled.
Setting Stride Size and Stripe Width for ext2/3 (extN) when Using a RAID
The extN filesystem family has create-time options of stride and stripe width. Stride helps the filesystem ensure that critical metadata structures are spread across the disks in the RAID evenly, to keep any given disk from becoming a hotspot. Stripe width allows for filesystem optimization.
To calculate the correct values for stride size, take the chunk size of the RAID array and divide it by the block size of the filesystem. For example:
stride = (chunk size / filesystem block size)
Stripe width calculation requires the stride size and the number of data-bearing disks. The following table shows the calculation for number of data bearing disks per raid type.
- dbd = # of data bearing disks
- total_disks = # of active disks
- mirrored_sets = The number of raid 1 mirrored sets that are used to form the higher level group
| RAID Level | Data bearing disks (dbd) |
| 0 (Striping) | total_disks |
| 1 (Mirroring) | 1 |
| 5 | total_disks - 1 |
| 6 | total_disks - 2 |
| 10 | mirrored_sets |
| 50 | mirrored_sets - 1 |
To calculate the stripe width, take the number of data bearing disks and multiply it by the stride.
stripe_width = dbd * stride
Sample Configuration
Note: The example below is not a recommended configuration, but it is a good demonstration of how to use the above equations.
1. Create a RAID50 with 10 ioDrives combined into five mirrored sets, (two mirrored ioDrives per set) and 256KB chunk size.
2. Create an ext3 filesystem with an 8K block size:
(stride) 32K = 256K / 8K
(dbd) 4 = 5 - 1
(stripe_width) 128 = 4 * 32K
This results in the following command:
$ mkfs.ext3 -b 8192 -E stride=32 -E stripe_width=128 /dev/md0
For more information on setting the stripe size, see the following:
http://wiki.centos.org/HowTos/Disk_Optimization