public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] RAID-0 with LVM - is there any point?
@ 2007-04-01 20:18 Neil Bothwick
  2007-04-03  3:35 ` Daniel Iliev
  0 siblings, 1 reply; 9+ messages in thread
From: Neil Bothwick @ 2007-04-01 20:18 UTC (permalink / raw
  To: gentoo-user

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

I have two SATA drives, I have a partition on each combined as RAID-1 on
which I use LVM to create my important partitions (/usr, /var, /home
etc). I have another pair of partitions combined as RAID-0 on which I
have another LVM group containing less important partitions, where speed
and space matter more than security. Is there any advantage to using
RAID-0 with these partitions? It seemed a good idea when I set it up,
because I was using LVM on RAID for the rest, but as LVM stripes data
across the drives anyway, am I gaining anything from the RAID-0? Would I
be just as well off by adding the two partitions directly to the LVM
group?


-- 
Neil Bothwick

"I laugh in the face of danger, then I hide until it goes away"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-01 20:18 [gentoo-user] RAID-0 with LVM - is there any point? Neil Bothwick
@ 2007-04-03  3:35 ` Daniel Iliev
  2007-04-03  7:47   ` Neil Bothwick
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Iliev @ 2007-04-03  3:35 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick wrote:
> LVM stripes data
> across the drives anyway, am I gaining anything from the RAID-0? Would I
> be just as well off by adding the two partitions directly to the LVM
> group?
>
>
>   


Hi, Neil

I have to admit I've never made such tests and I'm guessing here but I
would say that you may be even slowing down the system this way. One
subsystem passing the data to another subsystem..well it seems logical
that you would gain performance if you could exclude one of those.

Actually I'd be glad to read some results from a "Fake RAID-0 vs LVM"
tests. My bet would be that RAID-0 w/o LVM would give the best speeds

-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-03  3:35 ` Daniel Iliev
@ 2007-04-03  7:47   ` Neil Bothwick
  2007-04-05 14:39     ` Daniel Iliev
  0 siblings, 1 reply; 9+ messages in thread
From: Neil Bothwick @ 2007-04-03  7:47 UTC (permalink / raw
  To: gentoo-user

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

Hello Daniel Iliev,

> Actually I'd be glad to read some results from a "Fake RAID-0 vs LVM"
> tests. My bet would be that RAID-0 w/o LVM would give the best speeds

Omitting LVM isn't an option, I'd lose all the flexibility that LVM
offers. I don't see why RAID-0 should be necessarily more efficient than
LVM, unless there's something superior about RAID-0's striping
algorithms. I could do some before and after tests, but I'd first have the
reformat the filesystems to remove any effects of fragmentation.

If no one comes up with a good reason for keeping the RAID, I'll get rid
of it, running bonnie++ before and after.


-- 
Neil Bothwick

Contentsoftaglinemaysettleduringshipping.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-03  7:47   ` Neil Bothwick
@ 2007-04-05 14:39     ` Daniel Iliev
  2007-04-05 15:37       ` Neil Bothwick
  2007-04-16 19:04       ` Bryan Whitehead
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Iliev @ 2007-04-05 14:39 UTC (permalink / raw
  To: gentoo-user

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

Neil Bothwick wrote:
> Hello Daniel Iliev,
>
>   
>> Actually I'd be glad to read some results from a "Fake RAID-0 vs LVM"
>> tests. My bet would be that RAID-0 w/o LVM would give the best speeds
>>     
>
> Omitting LVM isn't an option, I'd lose all the flexibility that LVM
> offers. I don't see why RAID-0 should be necessarily more efficient than
> LVM, unless there's something superior about RAID-0's striping
> algorithms. I could do some before and after tests, but I'd first have the
> reformat the filesystems to remove any effects of fragmentation.
>
> If no one comes up with a good reason for keeping the RAID, I'll get rid
> of it, running bonnie++ before and after.
>
>
>   

Hi, Neil!

Out of curiosity I made some tests which confirmed my expectations. What
about you - did you have time (and wish) to take some performance
benchmarks? I would be glad to see some additional results.

I'm attaching my tests in file called "bench.txt".


-- 
Best regards,
Daniel



[-- Attachment #2: bench.txt --]
[-- Type: text/plain, Size: 1389 bytes --]

echo y | mdadm -C /dev/md9 -n2 /dev/sda11 /dev/sdb11 -l0
mkfs.xfs /dev/md9
mkdir /test
mount /dev/md9 /test
dd if=/dev/urandom of=/test.rnd bs=1M count=1500

time cp /test.rnd /test
real    0m44.981s
user    0m0.036s
sys     0m6.967s

sync

time mv /test.rnd /test
real    0m47.514s
user    0m0.047s
sys     0m7.077s

sync

time mv /test/test.rnd /
real    0m53.863s
user    0m0.060s
sys     0m8.885s

mdadm --stop /dev/md9
pvcreate /dev/sda11
pvcreate /dev/sdb11
vgcreate test /dev/sda11
vgextend test /dev/sdb11
vgdisplay | grep 'Total PE'
  Total PE              1686
lvcreate -i2 -l1686 -nlogvol test
mkfs.xfs /dev/test/logvol
mount /dev/test/logvol /test


time cp /test.rnd /test

real    1m12.183s
user    0m0.039s
sys     0m9.570s

sync

time mv /test.rnd /test

real    0m51.643s
user    0m0.044s
sys     0m7.275s

sync

time mv /test/test.rnd /

real    1m54.937s
user    0m0.047s
sys     0m9.556s


=================
BOTTOM LINE:

cp /test.rnd /test
LVM:        20.78 [MB/s]
RAID-0:     33.41 [MB/s]

mv /test.rnd /test
LVM:        29.04[MB/s]
RAID-0:     31.56[MB/s]

mv /test/test.rnd /
LVM:        11.11[MB/s]
RAID-0:     27.84[MB/s]

Strange: I repeated the last LVM test because it seemed to me as a low performance peak, but the result was again very low:
time mv /test/test.rnd /

real    1m27.775s
user    0m0.050s
sys     0m9.813s

which is: 1500/87.775 = 17.089 [MB/s]

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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-05 14:39     ` Daniel Iliev
@ 2007-04-05 15:37       ` Neil Bothwick
  2007-04-05 16:48         ` Daniel Iliev
  2007-04-16 19:04       ` Bryan Whitehead
  1 sibling, 1 reply; 9+ messages in thread
From: Neil Bothwick @ 2007-04-05 15:37 UTC (permalink / raw
  To: gentoo-user

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

On Thu, 05 Apr 2007 17:39:06 +0300, Daniel Iliev wrote:

> Out of curiosity I made some tests which confirmed my expectations. What
> about you - did you have time (and wish) to take some performance
> benchmarks? I would be glad to see some additional results.

So your tests show that RAID-0 is faster than LVM, but I'll be using LVM
anyway so the comparison will have to be between LVM+RAID and LVM alone.
I haven't had a chance to do this yet, hopefully over the holiday weekend.


-- 
Neil Bothwick

"RAM DISK is NOT an installation procedure!"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-05 15:37       ` Neil Bothwick
@ 2007-04-05 16:48         ` Daniel Iliev
  2007-04-05 17:26           ` Daniel Iliev
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Iliev @ 2007-04-05 16:48 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick wrote:
> On Thu, 05 Apr 2007 17:39:06 +0300, Daniel Iliev wrote:
>
>   
>> Out of curiosity I made some tests which confirmed my expectations. What
>> about you - did you have time (and wish) to take some performance
>> benchmarks? I would be glad to see some additional results.
>>     
>
> So your tests show that RAID-0 is faster than LVM, but I'll be using LVM
> anyway so the comparison will have to be between LVM+RAID and LVM alone.
> I haven't had a chance to do this yet, hopefully over the holiday weekend.
>
>
>   

OK
I still have that free space and I'll post the results of the same test
against RAID0+LVM.

-- 
Best regards,
Daniel


-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-05 16:48         ` Daniel Iliev
@ 2007-04-05 17:26           ` Daniel Iliev
  2007-04-08 19:06             ` Neil Bothwick
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Iliev @ 2007-04-05 17:26 UTC (permalink / raw
  To: gentoo-user

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

Daniel Iliev wrote:
> Neil Bothwick wrote:
>   
>> On Thu, 05 Apr 2007 17:39:06 +0300, Daniel Iliev wrote:
>>
>>   
>>     
>>> Out of curiosity I made some tests which confirmed my expectations. What
>>> about you - did you have time (and wish) to take some performance
>>> benchmarks? I would be glad to see some additional results.
>>>     
>>>       
>> So your tests show that RAID-0 is faster than LVM, but I'll be using LVM
>> anyway so the comparison will have to be between LVM+RAID and LVM alone.
>> I haven't had a chance to do this yet, hopefully over the holiday weekend.
>>
>>
>>   
>>     
>
> OK
> I still have that free space and I'll post the results of the same test
> against RAID0+LVM.
>
>   

Here we go. I think the results can't be interpreted unambiguously.
Perhaps I'll use a benchmarking program in the weekend to get clearer
results.

-- 
Best regards,
Daniel



[-- Attachment #2: test.txt --]
[-- Type: text/plain, Size: 1056 bytes --]

echo y | mdadm -C /dev/md9 -n2 /dev/sda11 /dev/sdb11 -l0
pvcreate /dev/md9
vgcreate test /dev/md9
vgdisplay | grep 'Total PE'
  Total PE              1686
lvcreate -i2 -l1686 -nlogvol test 
  Using default stripesize 64,00 KB
  Number of stripes (2) must not exceed number of physical volumes (1)
//ooops! :) //
lvcreate  -l1686 -nlogvol test 
  Logical volume "logvol" created

mkfs.xfs /dev/test/logvol
mount /dev/test/logvol /test
time cp /test.rnd /test

real    0m54.547s
user    0m0.046s
sys     0m7.118s

sync

time mv /test.rnd /test

real    0m46.863s
user    0m0.067s
sys     0m7.045s

sync

time mv /test/test.rnd /

real    1m27.282s
user    0m0.063s
sys     0m13.456s


BOTTOM LINE:

(LVM and RAID-0 are taken rom the prev. tests. The new one here is only RAID-0+LVM)

cp /test.rnd /test
LVM:      20.78 [MB/s]
RAID-0:   33.41 [MB/s]
RAID+LVM: 27.49 [MB/s]

mv /test.rnd /test

LVM:      29.04[MB/s]
RAID-0:   31.56[MB/s]
RAID+LVM: 32.00 [MB/s]

time mv /test/test.rnd /
LVM:      17.089 [MB/s]
RAID-0:   27.84[MB/s]
RAID+LVM: 17.185 [MB/s]



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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-05 17:26           ` Daniel Iliev
@ 2007-04-08 19:06             ` Neil Bothwick
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Bothwick @ 2007-04-08 19:06 UTC (permalink / raw
  To: gentoo-user

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

Hello Daniel Iliev,

> Here we go. I think the results can't be interpreted unambiguously.
> Perhaps I'll use a benchmarking program in the weekend to get clearer
> results.

I've found time to move things off the RAID to I can compare with freshly
formatted filesystems. LVM on top of RAID-0 is substantially faster than
LVM striped across the partitions directly - 50-100% on many of the tests.

I'll put the HTML output on a web site later, but after all that, what
I've got already seems the best option.


-- 
Neil Bothwick

Dolly Parton-- silicone based life

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-user] RAID-0 with LVM - is there any point?
  2007-04-05 14:39     ` Daniel Iliev
  2007-04-05 15:37       ` Neil Bothwick
@ 2007-04-16 19:04       ` Bryan Whitehead
  1 sibling, 0 replies; 9+ messages in thread
From: Bryan Whitehead @ 2007-04-16 19:04 UTC (permalink / raw
  To: gentoo-user

I think you need to try running a real benchmark like bonnie++ against both.

For example, you run "time dd" but you don't include the "sync" in the 
time...

Daniel Iliev wrote:

>Neil Bothwick wrote:
>  
>
>>Hello Daniel Iliev,
>>
>>  
>>    
>>
>>>Actually I'd be glad to read some results from a "Fake RAID-0 vs LVM"
>>>tests. My bet would be that RAID-0 w/o LVM would give the best speeds
>>>    
>>>      
>>>
>>Omitting LVM isn't an option, I'd lose all the flexibility that LVM
>>offers. I don't see why RAID-0 should be necessarily more efficient than
>>LVM, unless there's something superior about RAID-0's striping
>>algorithms. I could do some before and after tests, but I'd first have the
>>reformat the filesystems to remove any effects of fragmentation.
>>
>>If no one comes up with a good reason for keeping the RAID, I'll get rid
>>of it, running bonnie++ before and after.
>>
>>
>>  
>>    
>>
>
>Hi, Neil!
>
>Out of curiosity I made some tests which confirmed my expectations. What
>about you - did you have time (and wish) to take some performance
>benchmarks? I would be glad to see some additional results.
>
>I'm attaching my tests in file called "bench.txt".
>
>
>  
>
>------------------------------------------------------------------------
>
>echo y | mdadm -C /dev/md9 -n2 /dev/sda11 /dev/sdb11 -l0
>mkfs.xfs /dev/md9
>mkdir /test
>mount /dev/md9 /test
>dd if=/dev/urandom of=/test.rnd bs=1M count=1500
>
>time cp /test.rnd /test
>real    0m44.981s
>user    0m0.036s
>sys     0m6.967s
>
>sync
>
>time mv /test.rnd /test
>real    0m47.514s
>user    0m0.047s
>sys     0m7.077s
>
>sync
>
>time mv /test/test.rnd /
>real    0m53.863s
>user    0m0.060s
>sys     0m8.885s
>
>mdadm --stop /dev/md9
>pvcreate /dev/sda11
>pvcreate /dev/sdb11
>vgcreate test /dev/sda11
>vgextend test /dev/sdb11
>vgdisplay | grep 'Total PE'
>  Total PE              1686
>lvcreate -i2 -l1686 -nlogvol test
>mkfs.xfs /dev/test/logvol
>mount /dev/test/logvol /test
>
>
>time cp /test.rnd /test
>
>real    1m12.183s
>user    0m0.039s
>sys     0m9.570s
>
>sync
>
>time mv /test.rnd /test
>
>real    0m51.643s
>user    0m0.044s
>sys     0m7.275s
>
>sync
>
>time mv /test/test.rnd /
>
>real    1m54.937s
>user    0m0.047s
>sys     0m9.556s
>
>
>=================
>BOTTOM LINE:
>
>cp /test.rnd /test
>LVM:        20.78 [MB/s]
>RAID-0:     33.41 [MB/s]
>
>mv /test.rnd /test
>LVM:        29.04[MB/s]
>RAID-0:     31.56[MB/s]
>
>mv /test/test.rnd /
>LVM:        11.11[MB/s]
>RAID-0:     27.84[MB/s]
>
>Strange: I repeated the last LVM test because it seemed to me as a low performance peak, but the result was again very low:
>time mv /test/test.rnd /
>
>real    1m27.775s
>user    0m0.050s
>sys     0m9.813s
>
>which is: 1500/87.775 = 17.089 [MB/s]
>
-- 
gentoo-user@gentoo.org mailing list



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

end of thread, other threads:[~2007-04-16 19:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-01 20:18 [gentoo-user] RAID-0 with LVM - is there any point? Neil Bothwick
2007-04-03  3:35 ` Daniel Iliev
2007-04-03  7:47   ` Neil Bothwick
2007-04-05 14:39     ` Daniel Iliev
2007-04-05 15:37       ` Neil Bothwick
2007-04-05 16:48         ` Daniel Iliev
2007-04-05 17:26           ` Daniel Iliev
2007-04-08 19:06             ` Neil Bothwick
2007-04-16 19:04       ` Bryan Whitehead

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox