From: Oliver Martin <oliver.martin@student.tuwien.ac.at>
To: Michael Guntsche <mike@it-loops.com>
Cc: linux-raid@vger.kernel.org,
Oliver Martin <oliver.martin@student.tuwien.ac.at>
Subject: Re: LVM performance
Date: Mon, 10 Mar 2008 00:27:32 +0100 [thread overview]
Message-ID: <47D47264.4070404@student.tuwien.ac.at> (raw)
In-Reply-To: <8D0FC34E-F0B0-4BAF-A466-2C8BC439E7FF@it-loops.com>
Michael Guntsche schrieb:
>
> On Mar 9, 2008, at 20:56, Oliver Martin wrote:
>
>> * LVM/md first extent stripe alignment: when creating the PV, specify
>> a --metadatasize that is divisible by all anticipated stripe sizes,
>> i.e., the least common multiple. For example, to accommodate for 3, 4
>> or 5 drive configurations with 64KB chunk size, that would be 768KB.
>>
>
> Aligning it on chunk-size should be enough so in your case 64KB.
> Personally I did a lot of tests during the last few weeks and this
> seemed to make not that big of a difference.
Hmm. Stripe alignment of the beginning of a file system would seem to
make sense. Otherwise, even if I tell the file system the stripe size,
how should it know where it's best to start writes? If my stripes are
128KB, and I tell the fs, it can make an effort to write 128KB blocks
whenever possible. But if the fs starts 64KB into a 128KB stripe, every
128KB write will cause two RMW cycles.
At least, that's how I understand it. Maybe there's something else
involved and it really doesn't make a difference?
>
>
>> * Alignment of other extents: for the initial array creation with 3
>> drives the default 4MB extent size is fine. When I add a fourth drive,
>> I can resize the extents with vgchange - though I'm a bit hesitant as
>> the manpage doesn't explicitly say that this doesn't destroy any data.
>> The bigger problem is that the extent size must be a power of two, so
>> the maximum I can use with 192KB stripe size is 64KB. I'll see if that
>> hurts performance. The vgchange manpage says it doesn't...
>>
>
> Why make the extents so small? You do not normally increase your LVs by
> 4MB. I use 256MB or 512MB extends.
I was under the impression that aligning the LVM extents to RAID stripes
was crucial ("What matters most is whether the starting physical address
of each logical volume extent is stripe aligned"). If the LVM extents
have nothing to do with how much is read/written at once, but rather
only define the granularity with which LVs can be created, aligning the
first extent could be enough.
Of course, I don't extend my LVs by 4MB, much less 64KB. The only reason
I use LVM at all is because I might one day add larger drives to the
array. Suppose I have 3 500GB drives and 2 750GB ones. In this
configuration I would use a 5-drive array with 500GB from each, and a
2-drive array with the rest on the larger ones. These two arrays would
then be joined by LVM to form one file system.
Thinking it all through again, I see that trying to align things to
stripes is utterly pointless as soon as I join arrays with different
stripe sizes together. Maybe I should revise my plan, or just accept
that I won't be getting optimal performance.
>
>> * Telling the file system that the underlying device is striped. ext3
>> has the stride parameter, and changing it doesn't seem to be possible.
>> XFS might be better, as the swidth/sunit options can be set at
>> mount-time. This would speed up writes, while reads of existing data
>> wouldn't be affected too much by the misalignment anyway. Right?
>>
>
> You can change the stride parameter of ext3 with tune2fs take a look at
> the -E switch, even after you created the filesystem.
Ah, I see that's a very recent addition to 1.40.7. Thanks for pointing
that out!
> That said bonnie++ results showed that while setting a correct stride
> for EXT3 increased the creation and deletion of files, the big
> sequential read and write tests suffered. But this is bonnie++......
Sorry, no idea why.
--
Oliver
next prev parent reply other threads:[~2008-03-09 23:27 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-17 3:58 RAID5 to RAID6 reshape? Beolach
2008-02-17 11:50 ` Peter Grandi
2008-02-17 14:45 ` Conway S. Smith
2008-02-18 5:26 ` Janek Kozicki
2008-02-18 12:38 ` Beolach
2008-02-18 14:42 ` Janek Kozicki
2008-02-19 19:41 ` LVM performance (was: Re: RAID5 to RAID6 reshape?) Oliver Martin
2008-02-19 19:52 ` Jon Nelson
2008-02-19 20:00 ` Iustin Pop
2008-02-19 23:19 ` LVM performance Peter Rabbitson
2008-02-20 12:19 ` LVM performance (was: Re: RAID5 to RAID6 reshape?) Peter Grandi
2008-02-22 13:41 ` LVM performance Oliver Martin
2008-03-07 8:14 ` Peter Grandi
2008-03-09 19:56 ` Oliver Martin
2008-03-09 21:13 ` Michael Guntsche
2008-03-09 23:27 ` Oliver Martin [this message]
2008-03-09 23:53 ` Michael Guntsche
2008-03-10 8:54 ` Oliver Martin
2008-03-10 21:04 ` Peter Grandi
2008-03-12 14:03 ` Michael Guntsche
2008-03-12 19:54 ` Peter Grandi
2008-03-12 20:11 ` Guntsche Michael
2008-03-10 0:32 ` Richard Scobie
2008-03-10 0:53 ` Michael Guntsche
2008-03-10 0:59 ` Richard Scobie
2008-03-10 1:21 ` Michael Guntsche
2008-02-18 19:05 ` RAID5 to RAID6 reshape? Peter Grandi
2008-02-20 6:39 ` Alexander Kühn
2008-02-22 8:13 ` Peter Grandi
2008-02-23 20:40 ` Nagilum
2008-02-25 0:10 ` Peter Grandi
2008-02-25 16:31 ` Nagilum
2008-02-17 13:31 ` Janek Kozicki
2008-02-17 16:18 ` Conway S. Smith
2008-02-18 3:48 ` Neil Brown
2008-02-17 22:40 ` Mark Hahn
2008-02-17 23:54 ` Janek Kozicki
2008-02-18 12:46 ` Andre Noll
2008-02-18 18:23 ` Mark Hahn
2008-02-17 14:06 ` Janek Kozicki
2008-02-17 23:54 ` cat
2008-02-18 3:43 ` Neil Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47D47264.4070404@student.tuwien.ac.at \
--to=oliver.martin@student.tuwien.ac.at \
--cc=linux-raid@vger.kernel.org \
--cc=mike@it-loops.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).