Gentoo Archives: gentoo-user

From: Bryan Whitehead <driver@×××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] RAID-0 with LVM - is there any point?
Date: Mon, 16 Apr 2007 19:11:41
Message-Id: 4623C8D5.6000104@megahappy.net
In Reply to: Re: [gentoo-user] RAID-0 with LVM - is there any point? by Daniel Iliev
1 I think you need to try running a real benchmark like bonnie++ against both.
2
3 For example, you run "time dd" but you don't include the "sync" in the
4 time...
5
6 Daniel Iliev wrote:
7
8 >Neil Bothwick wrote:
9 >
10 >
11 >>Hello Daniel Iliev,
12 >>
13 >>
14 >>
15 >>
16 >>>Actually I'd be glad to read some results from a "Fake RAID-0 vs LVM"
17 >>>tests. My bet would be that RAID-0 w/o LVM would give the best speeds
18 >>>
19 >>>
20 >>>
21 >>Omitting LVM isn't an option, I'd lose all the flexibility that LVM
22 >>offers. I don't see why RAID-0 should be necessarily more efficient than
23 >>LVM, unless there's something superior about RAID-0's striping
24 >>algorithms. I could do some before and after tests, but I'd first have the
25 >>reformat the filesystems to remove any effects of fragmentation.
26 >>
27 >>If no one comes up with a good reason for keeping the RAID, I'll get rid
28 >>of it, running bonnie++ before and after.
29 >>
30 >>
31 >>
32 >>
33 >>
34 >
35 >Hi, Neil!
36 >
37 >Out of curiosity I made some tests which confirmed my expectations. What
38 >about you - did you have time (and wish) to take some performance
39 >benchmarks? I would be glad to see some additional results.
40 >
41 >I'm attaching my tests in file called "bench.txt".
42 >
43 >
44 >
45 >
46 >------------------------------------------------------------------------
47 >
48 >echo y | mdadm -C /dev/md9 -n2 /dev/sda11 /dev/sdb11 -l0
49 >mkfs.xfs /dev/md9
50 >mkdir /test
51 >mount /dev/md9 /test
52 >dd if=/dev/urandom of=/test.rnd bs=1M count=1500
53 >
54 >time cp /test.rnd /test
55 >real 0m44.981s
56 >user 0m0.036s
57 >sys 0m6.967s
58 >
59 >sync
60 >
61 >time mv /test.rnd /test
62 >real 0m47.514s
63 >user 0m0.047s
64 >sys 0m7.077s
65 >
66 >sync
67 >
68 >time mv /test/test.rnd /
69 >real 0m53.863s
70 >user 0m0.060s
71 >sys 0m8.885s
72 >
73 >mdadm --stop /dev/md9
74 >pvcreate /dev/sda11
75 >pvcreate /dev/sdb11
76 >vgcreate test /dev/sda11
77 >vgextend test /dev/sdb11
78 >vgdisplay | grep 'Total PE'
79 > Total PE 1686
80 >lvcreate -i2 -l1686 -nlogvol test
81 >mkfs.xfs /dev/test/logvol
82 >mount /dev/test/logvol /test
83 >
84 >
85 >time cp /test.rnd /test
86 >
87 >real 1m12.183s
88 >user 0m0.039s
89 >sys 0m9.570s
90 >
91 >sync
92 >
93 >time mv /test.rnd /test
94 >
95 >real 0m51.643s
96 >user 0m0.044s
97 >sys 0m7.275s
98 >
99 >sync
100 >
101 >time mv /test/test.rnd /
102 >
103 >real 1m54.937s
104 >user 0m0.047s
105 >sys 0m9.556s
106 >
107 >
108 >=================
109 >BOTTOM LINE:
110 >
111 >cp /test.rnd /test
112 >LVM: 20.78 [MB/s]
113 >RAID-0: 33.41 [MB/s]
114 >
115 >mv /test.rnd /test
116 >LVM: 29.04[MB/s]
117 >RAID-0: 31.56[MB/s]
118 >
119 >mv /test/test.rnd /
120 >LVM: 11.11[MB/s]
121 >RAID-0: 27.84[MB/s]
122 >
123 >Strange: I repeated the last LVM test because it seemed to me as a low performance peak, but the result was again very low:
124 >time mv /test/test.rnd /
125 >
126 >real 1m27.775s
127 >user 0m0.050s
128 >sys 0m9.813s
129 >
130 >which is: 1500/87.775 = 17.089 [MB/s]
131 >
132 --
133 gentoo-user@g.o mailing list