说明:
我们有一个服务器:
>型号:HP ProLiant DL160 G6
> 4 x 240GB SSD(RAID-10)
> 72GB DDR3内存
> 2 x L5639
> HP P410 RAID控制器(256MB,V6.40,Rom版本:8.40.41.00)
SSD驱动器是4个全新的2.5英寸Intel 530,读取速度为540MB / s,写入速度为490MB / s
> CentOS 6
>文件系统是ext4
但这是raid 10上读取速度的测试结果:
hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 824 MB in 3.00 seconds = 274.50 MB/sec
[root@localhost ~]# hdparm -t /dev/mapper/vg_localhost-lv_root
/dev/mapper/vg_localhost-lv_root:
Timing buffered disk reads: 800 MB in 3.01 seconds = 266.19 MB/sec
这是写速度:
dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 4.91077 s, 109 MB/s
我们希望通过raid 10获得1GB的读取速度,但270MB甚至不是单个磁盘的速度!
问题:
>为什么这么慢?
>是因为RAID控制器吗?
更新1 – 相同的读/写速度:
更改了答案中提到的一些设置后,我得到以下结果:
(任何人都知道为什么它显示4GB而不是400MB作为读取速度?!)
编辑:看起来命令是错误的,我们应该使用-s144g这个数量的ram,这就是为什么它显示4GB(如ewwhite的评论所示)
[root@192 ~]# iozone -t1 -i0 -i1 -i2 -r1m -s56g
Iozone: Performance Test of File I/O
Version $Revision: 3.408 $
Compiled for 64 bit mode.
Build: linux
Record Size 1024 KB
File size set to 58720256 KB
Command line used: iozone -t1 -i0 -i1 -i2 -r1m -s56g
Output is in Kbytes/sec
Each process writes a 58720256 Kbyte file in 1024 Kbyte records
Children see throughput for 1 initial writers = 135331.80 KB/sec
Children see throughput for 1 rewriters = 124085.66 KB/sec
Children see throughput for 1 readers = 4732046.50 KB/sec
Children see throughput for 1 re-readers = 4741508.00 KB/sec
Children see throughput for 1 random readers = 4590884.50 KB/sec
Children see throughput for 1 random writers = 124082.41 KB/sec
但旧的hdparm -t / dev / sda命令仍显示:
定时缓冲磁盘读取:在300秒内810 MB = 269.85 MB /秒
更新2(tuned-utils pack) – 读取速度现在为600MB / s:
最后有些希望,我们已经从raid控制器中禁用了缓存并且之前做了一些其他事情没有运气,但是因为我们重新加载了服务器并再次安装了操作系统,我们忘记按照ewwhite的回答中的建议安装“tuned-utils”(谢谢ewwhite为你建议的这个很棒的包裹)
安装tuned-utils并选择企业存储配置文件后,读取速度现在约为600MB / s,但写入速度仍然非常慢(~160MB)(:
以下是iozone -t1 -i0 -i1 -i2 -r1m -s144g命令的结果:
Children see throughput for 1 initial writers = 165331.80 KB/sec
Children see throughput for 1 rewriters = 115734.91 KB/sec
Children see throughput for 1 readers = 719323.81 KB/sec
Children see throughput for 1 re-readers = 732008.56 KB/sec
Children see throughput for 1 random readers = 549284.69 KB/sec
Children see throughput for 1 random writers = 116389.76 KB/sec
即使使用hdparm -t / dev / sda命令,我们也有:
定时缓冲磁盘读取:在300秒内1802 MB = 600.37 MB /秒
对写入速度非常慢的任何建议?
更新3 – 评论中要求的一些信息:
写入速度仍然很低(~150MB / s,甚至不是单个磁盘的1/3)
df -h和fdisk -l的输出:
[root@192 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 441G 3.2G 415G 1% /
tmpfs 36G 0 36G 0% /dev/shm
[root@192 ~]# fdisk -l
Disk /dev/sda: 480.0 GB, 480047620096 bytes
255 heads, 63 sectors/track, 58362 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00040c3c
Device Boot Start End Blocks Id System
/dev/sda1 * 1 58363 468795392 83 Linux