最新消息:

AWS用使多个EBS做Raid0来提高IO

未分类 admin 3555浏览 0评论

aws上创建raid0:

?[Copy to clipboard]View Code SHELL
1
2
3
4
5
6
7
8
9
10
11
mdadm --create /dev/md0 --level=0 -c256 --raid-devices=8 /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm

echo 'DEVICE /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm' > /etc/mdadm.conf

mdadm --detail --scan >> /etc/mdadm.conf

blockdev --setra 65536 /dev/md0

mkfs -t ext3 /dev/md0

mount /dev/md0 /data1/test

 

下面是速度测试,IO只提高了不到一倍,没有达到理想的状态。不过聊胜于无了。

?[Copy to clipboard]View Code SHELL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[root@ip-10-160-206-223 data1]# bonnie++ -s 2048 -r 512 -d /data1/test/ -m raid0 -u root
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.03e       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
raid0            2G 83720  95 813061  95 1185231 100 84567  97 2828489  97  1187   0
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
raid0,2G,83720,95,813061,95,1185231,100,84567,97,2828489,97,1187.5,0,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

[root@ip-10-160-206-223 data1]# bonnie++ -s 2048 -r 512 -d /data1/test/ -m raid0 -u root -b
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.03e       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
raid0            2G 87919  99 55024   6 56396   5 88632  99 2981975  99 +++++ +++
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   319   0 +++++ +++   266   0   307   0 +++++ +++   269   0
raid0,2G,87919,99,55024,6,56396,5,88632,99,2981975,99,+++++,+++,16,319,0,+++++,+++,266,0,307,0,+++++,+++,269,0

[root@ip-10-160-206-223 data1]# bonnie++ -s 2048 -r 512 -d /data2/test/ -m ebs -u root -b
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.03e       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
ebs              2G 78798  88 29578   3 36800   3 88879  99 3027079  99 +++++ +++
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   443   0 +++++ +++   416   0   435   0 +++++ +++   423   0
ebs,2G,78798,88,29578,3,36800,3,88879,99,3027079,99,+++++,+++,16,443,0,+++++,+++,416,0,435,0,+++++,+++,423,0

转载请注明:爱开源 » AWS用使多个EBS做Raid0来提高IO

您必须 登录 才能发表评论!