如何检测raid的传输速度?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13

如何检测raid的传输速度?

#1

帖子 relaxssl » 2008-12-24 15:23

这个是我的磁盘情况,组的是raid0,如何检测它的传输速度?
linux@ubuntu:~$ sudo hdparm -Tt /dev/md1
[sudo] password for linux:

/dev/md1:
Timing cached reads: 1970 MB in 2.00 seconds = 984.92 MB/sec
Timing buffered disk reads: 214 MB in 32.02 seconds = 6.68 MB/sec
几乎令人崩溃的事,这样检测准确么?
附件
screenshot5.png
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

Re: 如何检测raid的传输速度?

#2

帖子 oneleaf » 2008-12-24 15:27

准确,如果当时磁盘本身有大量读写,也就这样了。
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13

Re: 如何检测raid的传输速度?

#3

帖子 relaxssl » 2008-12-24 15:36

oneleaf 写了:准确,如果当时磁盘本身有大量读写,也就这样了。
很肯定,检测时并没有大量的读写,只开了firefox,QQ,星际绎王
linux@ubuntu:~$ sudo hdparm -Tt /dev/sda


/dev/sda:
Timing cached reads: 1904 MB in 2.00 seconds = 952.09 MB/sec
Timing buffered disk reads: 226 MB in 3.00 seconds = 75.27 MB/sec
linux@ubuntu:~$
上面是以前单块磁盘的情况

下面是对md1的检测
linux@ubuntu:~$ sudo hdparm -Tt /dev/md1
[sudo] password for linux:

/dev/md1:
Timing cached reads: 1970 MB in 2.00 seconds = 984.92 MB/sec
Timing buffered disk reads: 214 MB in 32.02 seconds = 6.68 MB/sec
linux@ubuntu:~$ sudo hdparm -Tt /dev/md2
对md2的检测
/dev/md2:
Timing cached reads: 1916 MB in 2.00 seconds = 958.23 MB/sec
Timing buffered disk reads: 36 MB in 30.45 seconds = 1.18 MB/sec
linux@ubuntu:~$

如果这样的测试数据准确,那么组Raid0还有什么意义呢?可是我确实感觉到了速度的提升,我都怀是不是心理作用了。
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13

Re: 如何检测raid的传输速度?

#4

帖子 relaxssl » 2008-12-24 16:30

我在网络上查找资料,发也别人也和我相同的问题,可见一定不是系统在读取大量数据同时在测试的原因。

https://bugs.launchpad.net/ubuntu/+sour ... bug/221506
附件
screenshot2.png
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

Re: 如何检测raid的传输速度?

#5

帖子 oneleaf » 2008-12-24 17:36

iostat 2 看看结果?
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13

Re: 如何检测raid的传输速度?

#6

帖子 relaxssl » 2008-12-24 22:42

oneleaf 写了:iostat 2 看看结果?
能看出异常?
linux@ubuntu:~$ iostat 2
Linux 2.6.24-22-generic (ubuntu) 12/24/2008

avg-cpu: %user %nice %system %iowait %steal %idle
15.35 0.38 3.91 8.94 0.00 71.42

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.64 11.97 0.00 4584 0
sdb 12.56 468.74 32.91 179578 12608
sdc 10.30 449.16 26.44 172078 10128
sdd 10.34 455.44 27.04 174482 10360
sde 9.97 443.36 26.56 169854 10176
md1 63.89 1669.40 72.15 639562 27640
md2 11.40 118.76 40.76 45498 15616
md0 0.30 2.42 0.00 928 0

avg-cpu: %user %nice %system %iowait %steal %idle
4.46 0.00 0.47 1.41 0.00 93.66

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 1.00 0.00 316.00 0 632
sdc 1.00 0.00 372.00 0 744
sdd 2.00 0.00 316.00 0 632
sde 1.00 0.00 288.00 0 576
md1 161.50 0.00 1292.00 0 2584
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
2.17 0.00 0.48 0.00 0.00 97.34

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
6.61 0.00 2.28 0.00 0.00 91.12

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
7.89 0.00 3.29 0.00 0.00 88.82

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
1.90 0.00 2.14 0.00 0.00 95.95

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
9.84 0.00 1.41 0.00 0.00 88.76

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
8.94 0.00 2.29 0.00 0.00 88.76

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
7.92 0.00 1.49 0.00 0.00 90.59

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
11.54 0.00 1.20 2.16 0.00 85.10

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 25.00 0.00 260.00 0 520
sdc 21.00 0.00 232.00 0 464
sdd 10.50 0.00 144.00 0 288
sde 6.00 0.00 68.00 0 136
md1 69.50 0.00 556.00 0 1112
md2 18.50 0.00 148.00 0 296
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
13.41 0.00 2.59 0.00 0.00 84.00

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
3.66 0.00 0.73 0.73 0.00 94.88

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 0.00 0.00 0.00 0 0
sdc 0.00 0.00 0.00 0 0
sdd 0.00 0.00 0.00 0 0
sde 0.00 0.00 0.00 0 0
md1 25.50 0.00 204.00 0 408
md2 0.50 0.00 4.00 0 8
md0 0.00 0.00 0.00 0 0

avg-cpu: %user %nice %system %iowait %steal %idle
2.87 0.00 0.24 0.48 0.00 96.41

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.00 0.00 0.00 0 0
sdb 6.50 0.00 112.00 0 224
sdc 3.00 0.00 28.00 0 56
sdd 3.50 0.00 36.00 0 72
sde 3.50 0.00 32.00 0 64
md1 0.00 0.00 0.00 0 0
md2 0.00 0.00 0.00 0 0
md0 0.00 0.00 0.00 0 0
ryoohki
帖子: 3249
注册时间: 2008-10-28 20:18

Re: 如何检测raid的传输速度?

#7

帖子 ryoohki » 2008-12-25 7:28

pci 总线 那可怜的 133M 带宽 无法承受4块SCSI硬盘组raid0所需要的带宽
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

Re: 如何检测raid的传输速度?

#8

帖子 oneleaf » 2008-12-25 8:40

看上去没有什么问题,检查下系统的日志,有没有提到硬盘错误?有一种可能是其中某个硬盘的IO错误,也会导致很低。
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13

Re: 如何检测raid的传输速度?

#9

帖子 relaxssl » 2008-12-25 13:56

oneleaf 写了:看上去没有什么问题,检查下系统的日志,有没有提到硬盘错误?有一种可能是其中某个硬盘的IO错误,也会导致很低。
这个是raid0,如果有一个盘有IO错误,应该完全不能进入系统才对阿,不过我这个判断可能不成立,那么你告诉我,如果某个硬盘有IO错误,系统日记应该有什么样的提示呢?
上次由 relaxssl 在 2008-12-25 14:29,总共编辑 2 次。
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13

Re: 如何检测raid的传输速度?

#10

帖子 relaxssl » 2008-12-25 13:57

ryoohki 写了:pci 总线 那可怜的 133M 带宽 无法承受4块SCSI硬盘组raid0所需要的带宽
那也不至于组好的raid0比单块硬盘慢这么多哦,有时检测速度只有944kb/sec:em20
raid0的组合不就是为了提高性能的么?
ryoohki
帖子: 3249
注册时间: 2008-10-28 20:18

Re: 如何检测raid的传输速度?

#11

帖子 ryoohki » 2008-12-26 1:50

软raid会有资源抢夺的问题
回复