Gentoo Archives: gentoo-performance

From: Florian Philipp <f.philipp@××××××.de>
To: gentoo-performance@l.g.o
Subject: Re: [gentoo-performance] LVM2 stripes and mirrors
Date: Fri, 13 Jul 2007 16:15:53
Message-Id: 200707131813.50125.f.philipp@addcom.de
In Reply to: Re: [gentoo-performance] LVM2 stripes and mirrors by "M. Edward (Ed) Borasky"
1 Am Donnerstag 12 Juli 2007 16:14 schrieb M. Edward (Ed) Borasky:
2 > Florian Philipp wrote:
3 > > Hi!
4 > >
5 > > I've got two questions concerning LVM2.
6 > >
7 > > Number one: What stripesize parameter would you use? The manual of my
8 > > mainboard advises to use 64k for a RAID-0. Would that be useful for my
9 > > portage tree or a more conventional partition like /usr and /var?
10 > >
11 > > Number two is not really a performance issue but it's LVM2-related:
12 > > LVM2-mirrors need an extra log device but the man pages don't tell
13 > > anything about how large it has to be or if it can be a partition or loop
14 > > device on the same hdd as one of the mirrors.
15 > >
16 > > Thanks in advance!
17 > >
18 > > Florian Philipp
19 >
20 > Sizing I/O subsystems is highly workload and filesystem dependent, and
21 > there's really no such thing as a one-size-fits-all quick answer. There
22 > are models and there are some really good I/O subsystem benchmarks you
23 > can use once you know what your workload characteristics are.
24 >
25 > I highly recommend the book "Storage Network Performance Analysis"
26 > http://www.amazon.com/Storage-Network-Performance-Analysis-Huseyin/dp/07645
27 >1685X/ for the tools to do this. But one thing you can do first is to run
28 > your workload on a system and capture data with "iostat". If you don't have
29 > "iostat", you'll need to emerge "sysstat". The "iozone" benchmark is in
30 > Portage, as is bonnie++. The I/O benchmark I like most is IOMeter, but that
31 > requires a Windows system to run the control console and
32 > downloading a Linux agent from their web site.
33
34 Thanks for the tips!
35
36 Just for the record:
37
38 I've solved problem number two: The log is not bigger than a few MB for 20GB
39 of storage space. To create it you have to use two commands:
40
41 At first, you create the mirror without log device:
42 lvcreate -n $Name -L $Size -m $Number_of_mirrors --corelog $Volume_group
43
44 Then you use lvconvert to attach a log and to create it anywhere:
45 lvconvert $Volume_group/$Logical_volume -m $Number_of_mirrors --alloc anywhere
46
47 Using "--alloc anywhere" with lvcreate is not wise because lvcreate tries to
48 create all volumes on one device, then.
49
50 Regards,
51
52 Florian Philipp