Skip to contentSkip to conversation

Test of LVM

linux-lvm Peter Kirk 4 participants 6 messages May 26, 2001 – May 27, 2001

lore
Share & tools
lore

Peter Kirk

author
#0 lore raw

Hi,

I have two disks in one Logical Volume, and all "Partitions" in the LV are striped over the disks, the two disks are both:
Maxtor 5T0T2H2 with 20 GB a piece, when I do
hdparm -t /dev/hda (or hdb) gives ~36MB/sec

Now I would like to know, how to test if my LVM is performing as it should, could you please tell me what to do, and how to interprete the nubers I get ? I think it will not as simple as saying 36 + 36 = 72MB/sec, but it should be somewhere there, shouldn`t it ?

thanks in advance
pwk

#1 lore raw
Quoted 5 lines · Peter Kirk

Hi,

I have two disks in one Logical Volume, and all "Partitions" in the LV are striped over the disks, the two disks are both:

I suppose you mean "a VG consiting of the two disks, with LV created with --stripe=2, that is like a RAID-0 would do" :)

Quoted 3 lines

Now I would like to know, how to test if my LVM is performing as it should, [...]

Depending on what you want to test, you can use several methods/tools ranging from dd'ing data in and out, recursive copying, hdparm, bonnie, bonnie++ and mongo. Check http://bulma.lug.net/static to see some filesystem-oriented test you could try.

Mu (little) experience with stripped LVs is that throughput is quite lower that the achieved with kernel's software RAID-0: the latter achieved nearly the sum of the disks's R/W KB/s, while stripped LVs performance felt quite behind.

But this was a _very_ simple test with a Pentium75 machine, with 16 MB RAM and two disks, 400 MB one and 800 MB the other (tested with bonnie). So results can be far from true under more realistic setups :).

Regards.

Signature · 5 lines
Jos� Luis Domingo L�pez
Linux Registered User #189436     Debian GNU/Linux Potato (P166 64 MB RAM)
 
jdomingo EN internautas PUNTO org  => � Spam ? Atente a las consecuencias
jdomingo AT internautas DOT   org  => Spam at your own risk
author
#2 lore raw

System goes very slow (was: Re: [linux-lvm] Test of LVM)

This is what bonnie gives me

Am Samstag, 26. Mai 2001 17:49 schrieben Sie:

Quoted 10 lines

On Saturday, 26 May 2001, at 14:35:45 +0200,

Quoted 4 lines · Peter Kirk

Hi,

I have two disks in one Logical Volume, and all "Partitions" in the LV are striped over the disks, the two disks are both:

I suppose you mean "a VG consiting of the two disks, with LV created with --stripe=2, that is like a RAID-0 would do" :)

I have no idea of what I mean, in the setup with SuSE`s installer (yast) there was this place to set the stripe option, which I set to two.

Quoted 8 lines
Quoted 3 lines

Now I would like to know, how to test if my LVM is performing as it should, [...]

Depending on what you want to test, you can use several methods/tools ranging from dd'ing data in and out, recursive copying, hdparm, bonnie, bonnie++ and mongo. Check http://bulma.lug.net/static to see some filesystem-oriented test you could try.

I tried bonnie, is this result what I should have expected ? root@notch:/home/pwk > bonnie -s 1024MB
Bonnie 1.2: File './Bonnie.2815', size: 1073741824, volumes: 1

Writing with putc()...         	done:   3270 kB/s  35.4 %CPU
Rewriting...                   	done:   1505 kB/s  19.3 %CPU
Writing intelligently...       	done:   4682 kB/s  11.4 %CPU

[I stopped bonnie here, do you need more output ?]

I don't know what this test does, but surely more than 3MB/sec of writing performance should be ??
I'm not certain if this problem I am about to describe is LVM specific, but I think that the most propable cause:

When I do e.g. a run of bonnie (-> My disks have work to do), the entire System goes *extremly* slow (each key hit takes about 1sec to apear on the terminal, from the command top to the coming up of the ascii chart there is a time gap of ~20sec...)
As Andreas Dilger pointed out, I can't have to disks on one Controler doing things simultanously. Might this somehow be the reason why my systems snails on disk usage ?
There is something I tested in such times of slowness, and that is the output of top

top [normal running system + X + KDE]

  319 root      	17   0  196M 196M  2352 S   	0.7 39.2   6:33 X
 2586 pwk       	12   0 12856  12M 11092 S   	0.1  2.5   0:43 kdeinit
 2887 root      	16   0   980  980   764 R     	0.1  0.1   0:00 top
    1 root       	9   0   216  216   180 S     	0.0  0.0   0:07 init
    2 root       	9   0     0    0     0 SW    	0.0  0.0   0:00 keventd
    3 root       	9   0     0    0     0 SW    	0.0  0.0   0:35 kswapd
    4 root       	9   0     0    0     0 SW    	0.0  0.0   0:00 kreclaimd
    5 root       	9   0     0    0     0 SW    	0.0  0.0   0:14 bdflush
    6 root       	9   0     0    0     0 SW    	0.0  0.0   0:07 kupdated
top [system with bonnie running]
2815 root      17   0   544  544   440 R    	37.5  0.1   4:50 bonnie
  319 root      16   0  196M 196M  2352 R    	15.4 39.2   6:01 X
 2599 pwk       15   0 19344  18M 12580 S    	12.5  3.7   1:58 kmail
 2189 pwk       10   0 11540  11M  7048 S    	9.9  2.2   3:21 kmix
  865 pwk        9   0  3168 3168  2272 S     	1.7  0.6   0:53 artsd
  896 pwk        9   0 11436  11M 10220 S     	1.1  2.2   1:29 kdeinit
  893 pwk        9   0 14448  14M 12344 S     	0.9  2.8   1:03 kdeinit
 2885 pwk       12   0   980  980   764 R    	0.7  0.1   0:00 top
  891 pwk       10   0 14916  14M 12904 S   	0.1  2.9   0:40 kdeinit
 2586 pwk        9   0 12840  12M 11076 S   	0.1  2.5   0:42 kdeinit
    1 root       9   0   216  216   180 S    		0.0  0.0   0:07 init

As you see, all processes seam to take much more CPU time when bonnie is running [noting that I am not using any of the programms activly, there are only running].

I would realy love to get rid of this problem, so please help. If you think I should try one of my HD on the second controler, could you please give me some hints of how not to destroy my linux system by doing this (where do I have to change things)

Quoted 10 lines

My (little) experience with stripped LVs is that throughput is quite lower that the achieved with kernel's software RAID-0: the latter achieved nearly the sum of the disks's R/W KB/s, while stripped LVs performance felt quite behind.

But this was a _very_ simple test with a Pentium75 machine, with 16 MB RAM and two disks, 400 MB one and 800 MB the other (tested with bonnie). So results can be far from true under more realistic setups :).

Can anybody comment on the speed difference between softraid0 and LVM ?

Thank you in advance

#3 lore raw

Re: System goes very slow (was: Re: [linux-lvm] Test of LVM)

Quoted 6 lines

root@notch:/home/pwk > bonnie -s 1024MB
Bonnie 1.2: File './Bonnie.2815', size: 1073741824, volumes: 1

Writing with putc()...          done:   3270 kB/s  35.4 %CPU
Rewriting...                    done:   1505 kB/s  19.3 %CPU
Writing intelligently...        done:   4682 kB/s  11.4 %CPU

[I stopped bonnie here, do you need more output ?]

Is DMA set on your harddrive ? (hdparm)

DL

Signature · 3 lines
Dominique Larchey
LORIA, Nancy, France
Tel. (Work) +33 (0) 3 83 59 20 13
author
#4 lore raw

Re: System goes very slow (was: Re: [linux-lvm] Test of LVM)

Am Sonntag, 27. Mai 2001 09:43 schrieben Sie:

Quoted 10 lines
Quoted 6 lines

root@notch:/home/pwk > bonnie -s 1024MB
Bonnie 1.2: File './Bonnie.2815', size: 1073741824, volumes: 1

Writing with putc()...          done:   3270 kB/s  35.4 %CPU
Rewriting...                    done:   1505 kB/s  19.3 %CPU
Writing intelligently...        done:   4682 kB/s  11.4 %CPU

[I stopped bonnie here, do you need more output ?]

Is DMA set on your harddrive ? (hdparm)

DL

Yes I thought it was enabled, until I checked. hda had it enabled, and hdb had not :-(
Here is the new bonnie

root@notch:/home/pwk > bonnie -s 512
Bonnie 1.2: File './Bonnie.651', size: 536870912, volumes: 1

Writing with putc()...         	done:  13874 kB/s  98.1 %CPU
Rewriting...                   	done:  10629 kB/s   6.0 %CPU
Writing intelligently...       	done: 107497 kB/s  93.1 %CPU
Reading with getc()...         	done:  11554 kB/s  75.6 %CPU
Reading intelligently...       	done:  52766 kB/s  24.3 %CPU
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
              ---Sequential Output (nosync)--- ---Sequential Input-- --Rnd 

Seek- -Per Char- --Block--- -Rewrite-- -Per Char- --Block---
--04k (03)-Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec
%CPU /sec %CPUnotch 1* 512 13874 98.1107497 93.1 10629 6.0 11554 75.6
52766 24.3 279.6 1.0

So... is this appropriate for two fast disks ? 10MB/sec are much better, but I was thing of 40 or 50 MB/sec. Am I doing anything wrong ?

pwk.linuxfan

#5 lore raw
In reply to Peter Kirk
Quoted 9 lines · Peter Kirk

I have two disks in one Logical Volume, and all "Partitions" in the LV are striped over the disks, the two disks are both:
Maxtor 5T0T2H2 with 20 GB a piece, when I do
hdparm -t /dev/hda (or hdb) gives ~36MB/sec

Now I would like to know, how to test if my LVM is performing as it should, could you please tell me what to do, and how to interprete the nubers I get ? I think it will not as simple as saying 36 + 36 = 72MB/sec, but it should be somewhere there, shouldn`t it ?

Not even close. IDE master/slave drives cannot do I/O at the same time, so your hda+hdb setup is broken. You will be lucky to get even the performance of a single drive like this.

Why do people want to do striping anyways??? You have 36MB/s and you will almost never even be able to use that up. Striping will just mean that both disks are always busy at the same time. If you had separate filesystems on the different drives, you could at least do copies between the two drives or write to /tmp and /usr/src/linux at some reasonable speed. If you have striping, then you will be seeking like crazy instead. You ALSO have the good luck that if either drive goes bad you lose ALL of your data.

The ONLY reason to do striping is if you NEED > 36MB streaming I/O speed for some reason (I don't think even real-time video needs that performance).

Cheers, Andreas

Signature · 3 lines
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert