raid-0 with mdadm vs lvm striping

raid-0 with mdadm vs lvm striping

am 10.08.2009 09:09:45 von andrew.henry

SSdtIHRoaW5raW5nIG9mIGJ1eWluZyBhIGNvdXBsZSBvZiBkaXNrcyB0byBw dXQgaW4gYSBzdHJp
cGVkIGFycmF5IGZvciBwZXJmb3JtYW5jZS4gIEkgYWxyZWFkeSBoYXZlIGEg cmFpZC0xIGFycmF5
IHdpdGggbWRhZG0uDQoNCkFyZSB0aGVyZSBhcmUgbWFuYWdlbWVudCBvciBw ZXJmb3JtYW5jZSBi
ZW5lZml0cyBvZiB1c2luZyBtZGFkbSByYWlkLTAgb3ZlciB1c2luZyBMVk0g c3RyaXBpbmc/DQoN
CkltIHRoaW5raW5nIGFsb25nIHRoZSBsaW5lcyBvZiAiTFZNIG1pZ2h0IGJl IGEgYmV0dGVyIGNo
b2ljZSBiZWNhdXNlIEkgY2FuIGhhdmUgbXkgc3RyaXBpbmcgKGJ5IGFkZGlu ZyBhbm90aGVyIGRp
c2sgdG8gdGhlIExWKSBhbmQgYWxzbyBoYXZlIHRoZSBhZGRlZCBib251cyBv ZiBpdCBiZWluZyBt
b3JlICdtYW5hZ2VhYmxlJyB0aGFuIHJhaWQsIGJlY2F1c2UgSSBjYW4gZ3Jv dyBvciBzaHJpbmsg
dGhlIExWIi4NCg0KSXMgbXkgaWRlYSBmdWxsIG9mIGhvbGVzPyAgQXJlIHRo ZXJlIHdlbGwga25v
d24gaXNzdWVzOyBwZXJmb3JtYW5jZSB3aXNlIG9yIG1hbmFnZWFiaWxpdHkg d2lzZSBvZiB1c2lu
ZyBhbiBMVk0gYXMgYSBzdHJpcGVkIGFycmF5IGZvciBwZXJmb3JtYW5jZT8N Cg0KQ29tbWVudHMg
d2VsY29tZQ0KIC0tYW5kcmV3DQo=
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid-0 with mdadm vs lvm striping

am 11.08.2009 23:35:15 von Drew

> Are there are management or performance benefits of using mdadm raid-0 over using LVM striping?

I haven't used LVM striping so take my answer with a grain of salt. In
my reading on the web about the two I came to the conclusion that MD's
raid-0 code is a bit better tested then LVM's. For that reason, and
because I believe in one tool for each job, I went with MD to handle
the RAID.

> Im thinking along the lines of "LVM might be a better choice because I can have my striping (by adding another disk to the LV) and also have the added bonus of it being more 'manageable' than raid, because I can grow or shrink the LV".

If you run LVM on top of raid you can have both. :-) All my servers
run this config and it makes things easy to move around as needed, in
fact a couple of times it saved my data (and my bacon). And with newer
versions of mdadm, you can create some interesting raid configs that
LVM has no chance of creating.

So why striping? Aside from faster speeds, raid-0 is anything but redundant.


--
Drew

"Nothing in life is to be feared. It is only to be understood."
--Marie Curie
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: raid-0 with mdadm vs lvm striping

am 12.08.2009 08:55:01 von andrew.henry

DQo+IElmIHlvdSBydW4gTFZNIG9uIHRvcCBvZiByYWlkIHlvdSBjYW4gaGF2 ZSBib3RoLiA6LSkg
QWxsIG15IHNlcnZlcnMNCj4gcnVuIHRoaXMgY29uZmlnIGFuZCBpdCBtYWtl cyB0aGluZ3MgZWFz
eSB0byBtb3ZlIGFyb3VuZCBhcyBuZWVkZWQsIGluDQo+IGZhY3QgYSBjb3Vw bGUgb2YgdGltZXMg
aXQgc2F2ZWQgbXkgZGF0YSAoYW5kIG15IGJhY29uKS4gQW5kIHdpdGggbmV3 ZXINCj4gdmVyc2lv
bnMgb2YgbWRhZG0sIHlvdSBjYW4gY3JlYXRlIHNvbWUgaW50ZXJlc3Rpbmcg cmFpZCBjb25maWdz
IHRoYXQNCj4gTFZNIGhhcyBubyBjaGFuY2Ugb2YgY3JlYXRpbmcuDQo+IA0K PiBTbyB3aHkgc3Ry
aXBpbmc/IEFzaWRlIGZyb20gZmFzdGVyIHNwZWVkcywgcmFpZC0wIGlzIGFu eXRoaW5nIGJ1dCBy
ZWR1bmRhbnQuDQo+IC0tDQo+IERyZXcNCg0KSSBuZWVkIHRoZSBzcGVlZCwg cHVyZSBhbmQgc2lt
cGxlLiAgSXQncyBnb2luZyB0byBiZSB1c2VkIGFzIGEgc2NyYXRjaCB2b2x1 bWUuICBJIGFscmVh
ZHkgaGF2ZSBhIG1pcnJvcmVkIHJhaWQgYXJyYXkgd2l0aCBtZGFkbSBmb3Ig bXkgInJlYWwiIGRh
dGEgYW5kIGJhY2t1cHMsIGJ1dCBJIG5lZWQgc29tZXRoaW5nIGZhc3RlciBq dXN0IHRvIHN0b3Jl
IHRlbXBvcmFyeSBmaWxlcyBvbi4NCg0KLS1hbmRyZXcNCg==
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid-0 with mdadm vs lvm striping

am 12.08.2009 10:41:46 von Goswin von Brederlow

"Henry, Andrew" writes:

>> If you run LVM on top of raid you can have both. :-) All my servers
>> run this config and it makes things easy to move around as needed, in
>> fact a couple of times it saved my data (and my bacon). And with newer
>> versions of mdadm, you can create some interesting raid configs that
>> LVM has no chance of creating.
>>
>> So why striping? Aside from faster speeds, raid-0 is anything but redundant.
>> --
>> Drew
>
> I need the speed, pure and simple. It's going to be used as a scratch volume. I already have a mirrored raid array with mdadm for my "real" data and backups, but I need something faster just to store temporary files on.
>
> --andrew

But why raid0 instead of striped lvm? Does that make a difference in
speed?

MfG
Goswin
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: raid-0 with mdadm vs lvm striping

am 12.08.2009 11:14:37 von andrew.henry

>
> But why raid0 instead of striped lvm? Does that make a difference in
> speed?
>
> MfG
> Goswin

That's what my question was: Will raid0 (striping) be faster or easier to manage than lvm striping

--andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid-0 with mdadm vs lvm striping

am 12.08.2009 18:00:51 von Billy Crook

On Wed, Aug 12, 2009 at 04:14, Henry, Andrew w=
rote:
> That's what my question was: =A0Will raid0 (striping) be faster or ea=
sier to manage than lvm striping

LVM striping won't change performance for small files. (That is files,
smaller than the extent size.) To be fair, RAID-0 striping won't
accelerate file access for files smaller than the stripe size either.
However, traditionally, raid0 stripe sizes are much much smaller than
LVM extent sizes. Both are however adjustable.

Either way, you will be reading from one disk and then another, and
then another, etc. The smaller the stripe size, the more likely
multiple disks will be doing their seeks and dma transfers at the same
time. For this reason, I would recommend RAID-0 if you don't need
uptime, and you keep backups elsewhere, and all you need is the most
speed you can get.

LVM is more about flexibility than performance. I don't use LVM
striping, but if I did, I would be using it to distribute wear between
multiple raid arrays; not for performance.

LVM on top of RAID is exceptionally common. Use RAID for performance
and availability, then use LVM for flexibility.

"Easier to manage"? Stop managing. Start using. With LVM on top of
raid, you can hot-move the logical volume off the raid0 array for
maintenance to the raid0 array. You can extend it onto new raid0
arrays. I'm fairly sure you can grow an existing raid0 array even
while it is in use onto additional disks.

But if you're playing with raid0 or lvm striping, I wouldn't as much
worry about being able to manage it while its in use. Just do your
managing when you replace a failed disk (and have to recreate the
entire array or logical volume).
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid-0 with mdadm vs lvm striping

am 12.08.2009 19:47:30 von Drew

> That's what my question was:  Will raid0 (striping) be faster or=
easier to manage than lvm striping

I don't know about faster but IMO it'll be easier with raid0. With LVM
you have to specify striping *every* time you create a new LV. With an
underlying raid0 array as the sole physical volume, you can create the
LV knowing it's striped.

One less switch to forget.


--=20
Drew

"Nothing in life is to be feared. It is only to be understood."
--Marie Curie
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid-0 with mdadm vs lvm striping

am 13.08.2009 04:09:10 von Goswin von Brederlow

Billy Crook writes:

> On Wed, Aug 12, 2009 at 04:14, Henry, Andrew=
wrote:
>> That's what my question was: =A0Will raid0 (striping) be faster or e=
asier to manage than lvm striping
>
> LVM striping won't change performance for small files. (That is files=
,
> smaller than the extent size.) To be fair, RAID-0 striping won't
> accelerate file access for files smaller than the stripe size either.
> However, traditionally, raid0 stripe sizes are much much smaller than
> LVM extent sizes. Both are however adjustable.

That sucks. LVM striping really should have a setting where it stripes
chunks within a PE.

MfG
Goswin
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: raid-0 with mdadm vs lvm striping

am 13.08.2009 04:40:19 von Guy Watkins

} -----Original Message-----
} From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
} owner@vger.kernel.org] On Behalf Of Goswin von Brederlow
} Sent: Wednesday, August 12, 2009 10:09 PM
} To: Billy Crook
} Cc: Henry, Andrew; goswin-v-b@web.de; Drew; linux-raid@vger.kernel.or=
g
} Subject: Re: raid-0 with mdadm vs lvm striping
}=20
} Billy Crook writes:
}=20
} > On Wed, Aug 12, 2009 at 04:14, Henry, Andrew m>
} wrote:
} >> That's what my question was: =A0Will raid0 (striping) be faster or=
easier
} to manage than lvm striping
} >
} > LVM striping won't change performance for small files. (That is fil=
es,
} > smaller than the extent size.) To be fair, RAID-0 striping won't
} > accelerate file access for files smaller than the stripe size eithe=
r.
} > However, traditionally, raid0 stripe sizes are much much smaller th=
an
} > LVM extent sizes. Both are however adjustable.
}=20
} That sucks. LVM striping really should have a setting where it stripe=
s
} chunks within a PE.
}=20
} MfG
} Goswin

Why not use this option?

-I, --stripesize StripeSize
Gives the number of kilobytes for the granularity of the
stripes. StripeSize must be 2^n (n =3D 2 to 9) for metadata in LVM1 fo=
rmat.
=46or metadata in LVM2 format, the stripe size may be a larger powe=
r of 2
but must not exceed the physical extent size.

I have never use lvcreate with Linux, but have with HP-UX. Looks about=
the
same, but maybe I am confused.

Guy

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid-0 with mdadm vs lvm striping

am 13.08.2009 10:08:34 von keld

On Thu, Aug 13, 2009 at 04:09:10AM +0200, Goswin von Brederlow wrote:
> Billy Crook writes:
>=20
> > On Wed, Aug 12, 2009 at 04:14, Henry, Andrew m> wrote:
> >> That's what my question was: =A0Will raid0 (striping) be faster or=
easier to manage than lvm striping
> >
> > LVM striping won't change performance for small files. (That is fil=
es,
> > smaller than the extent size.) To be fair, RAID-0 striping won't
> > accelerate file access for files smaller than the stripe size eithe=
r.

Have you tested this? In theory, both LVM and raid0 striping should
accellerate access to small files substantially, for example if a
process accesses a number of small files, which are laid out in sequenc=
e
on the file system. This is a common case.=20

I think this could come about eg if you roll in a tarball or package of
a system, then the small files are created in sequence, and the file
system should lay them out in sequence on the disk. When reading again,
the disk read ahead would secure that most of the data for a number of
small files were already read into the kernel cache when asked for, and
thus the files would be read at striping speeds.=20

> > However, traditionally, raid0 stripe sizes are much much smaller th=
an
> > LVM extent sizes. Both are however adjustable.

What are the parameters? raid normally assumes 64 kiB chunks, but i
normally use 256 kiB chunks, which is the lowest chunk size that we are
recommending out of the linux-raid group. What are normal with LVM?

best regards
keld
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: raid-0 with mdadm vs lvm striping

am 17.08.2009 09:27:35 von Goswin von Brederlow

"Guy Watkins" writes:

> } -----Original Message-----
> } From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
> } owner@vger.kernel.org] On Behalf Of Goswin von Brederlow
> } Sent: Wednesday, August 12, 2009 10:09 PM
> } To: Billy Crook
> } Cc: Henry, Andrew; goswin-v-b@web.de; Drew; linux-raid@vger.kernel.=
org
> } Subject: Re: raid-0 with mdadm vs lvm striping
> }=20
> } Billy Crook writes:
> }=20
> } > On Wed, Aug 12, 2009 at 04:14, Henry, Andrew com>
> } wrote:
> } >> That's what my question was: =A0Will raid0 (striping) be faster =
or easier
> } to manage than lvm striping
> } >
> } > LVM striping won't change performance for small files. (That is f=
iles,
> } > smaller than the extent size.) To be fair, RAID-0 striping won't
> } > accelerate file access for files smaller than the stripe size eit=
her.
> } > However, traditionally, raid0 stripe sizes are much much smaller =
than
> } > LVM extent sizes. Both are however adjustable.
> }=20
> } That sucks. LVM striping really should have a setting where it stri=
pes
> } chunks within a PE.
> }=20
> } MfG
> } Goswin
>
> Why not use this option?

Ignorance. :) I never use raid0 so I never needed to look for all the
stripe parameters.

> -I, --stripesize StripeSize
> Gives the number of kilobytes for the granularity of the
> stripes. StripeSize must be 2^n (n =3D 2 to 9) for metadata in LVM1 =
format.
> For metadata in LVM2 format, the stripe size may be a larger powe=
r of 2
> but must not exceed the physical extent size.
>
> I have never use lvcreate with Linux, but have with HP-UX. Looks abo=
ut the
> same, but maybe I am confused.
>
> Guy

MfG
Goswin
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html