[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] LVM2, RAID5 and ext3 stride



Hi All,

I wonder if anyone on this list might be able to clarify the best method for optimizing the performance of ext3 on a RAID 5 through LVM. My understanding is that when making the disk the stride parameter should be set the to the RAID 5 stripe size divided by the ext3 block size, which is easy.. But, I've also read, that to get the full performance gain it is necessary for the ext3 filesystem to reside in extents that are naturally aligned to the RAID 5 block side (ie the real LBA of block 0 on the filesystem modulo the raid block size must be 0). Is this even true? It sort of makes sense if the stride parameter is building the filesystem so that things are clustered together to avoid the RAID5 partial block read-modify-write penalty..

When I went to verify this I found that the LVM's PE's have been shifted by 384 sectors from the start of the partition, so the filesystem is not aligned.. ie:
$ dm table
main-xen0: 0 6291456 linear 8:2 384

Is there some way to run pvcreate to get 4M extents that are always 4M aligned, and still be able to do interesting things like grow the pv?

Additionally, is there a straightforward method to get the partition the LVM is on aligned as well? (The partition is necessary because the RAID is the only disk in the system and there is a small /boot partition).

If this really is necessary, it would be a handy feature to be able to get pvcreate to check the partition alignment and add the necessary padding so that the extents are aligned..

As an aside, I'm using a 3ware RAID controller to build a 3 disk RAID 5 with the unit's stripe size set to 64k, so I expect to use a ext3 stride parameter of 16 and an alignment of at least 64k on the PE's.

Thanks,
Jason


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]