linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] LVM2, RAID5 and ext3 stride
@ 2006-10-04 21:22 Jason Gunthorpe
  2006-10-05 20:15 ` Alasdair G Kergon
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Gunthorpe @ 2006-10-04 21:22 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1788 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] LVM2, RAID5 and ext3 stride
  2006-10-04 21:22 [linux-lvm] LVM2, RAID5 and ext3 stride Jason Gunthorpe
@ 2006-10-05 20:15 ` Alasdair G Kergon
  0 siblings, 0 replies; 2+ messages in thread
From: Alasdair G Kergon @ 2006-10-05 20:15 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, Oct 04, 2006 at 03:22:58PM -0600, Jason Gunthorpe wrote:
> 384 sectors from the start of the partition, so the filesystem is not

> 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?

Try out the --metadatasize option of pvcreate.
 
Alasdair
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-05 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-04 21:22 [linux-lvm] LVM2, RAID5 and ext3 stride Jason Gunthorpe
2006-10-05 20:15 ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).