linux – SSD(Intel 530)读取/写入速度非常慢,使用RAID 10

前端之家收集整理的这篇文章主要介绍了linux – SSD(Intel 530)读取/写入速度非常慢,使用RAID 10前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
说明:

我们有一个服务器:

>型号: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上读取速度的测试结果:

  1. hdparm -t /dev/sda
  2.  
  3. /dev/sda:
  4. Timing buffered disk reads: 824 MB in 3.00 seconds = 274.50 MB/sec
  5. [root@localhost ~]# hdparm -t /dev/mapper/vg_localhost-lv_root
  6.  
  7. /dev/mapper/vg_localhost-lv_root:
  8. Timing buffered disk reads: 800 MB in 3.01 seconds = 266.19 MB/sec

这是写速度:

  1. dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync
  2. 512+0 records in
  3. 512+0 records out
  4. 536870912 bytes (537 MB) copied,4.91077 s,109 MB/s

我们希望通过raid 10获得1GB的读取速度,但270MB甚至不是单个磁盘的速度!

问题:

>为什么这么慢?
>是因为RAID控制器吗?

更新1 – 相同的读/写速度:

更改了答案中提到的一些设置后,我得到以下结果:

(任何人都知道为什么它显示4GB而不是400MB作为读取速度?!)

编辑:看起来命令是错误的,我们应该使用-s144g这个数量的ram,这就是为什么它显示4GB(如ewwhite的评论所示)

  1. [root@192 ~]# iozone -t1 -i0 -i1 -i2 -r1m -s56g
  2. Iozone: Performance Test of File I/O
  3. Version $Revision: 3.408 $
  4. Compiled for 64 bit mode.
  5. Build: linux
  6.  
  7. Record Size 1024 KB
  8. File size set to 58720256 KB
  9. Command line used: iozone -t1 -i0 -i1 -i2 -r1m -s56g
  10. Output is in Kbytes/sec
  11. Each process writes a 58720256 Kbyte file in 1024 Kbyte records
  12.  
  13. Children see throughput for 1 initial writers = 135331.80 KB/sec
  14. Children see throughput for 1 rewriters = 124085.66 KB/sec
  15. Children see throughput for 1 readers = 4732046.50 KB/sec
  16. Children see throughput for 1 re-readers = 4741508.00 KB/sec
  17. Children see throughput for 1 random readers = 4590884.50 KB/sec
  18. 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的回答中的建议安装“tu​​ned-utils”(谢谢ewwhite为你建议的这个很棒的包裹)

安装tuned-utils并选择企业存储配置文件后,读取速度现在约为600MB / s,但写入速度仍然非常慢(~160MB)(:

以下是iozone -t1 -i0 -i1 -i2 -r1m -s144g命令的结果:

  1. Children see throughput for 1 initial writers = 165331.80 KB/sec
  2. Children see throughput for 1 rewriters = 115734.91 KB/sec
  3. Children see throughput for 1 readers = 719323.81 KB/sec
  4. Children see throughput for 1 re-readers = 732008.56 KB/sec
  5. Children see throughput for 1 random readers = 549284.69 KB/sec
  6. 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的输出

  1. [root@192 ~]# df -h
  2. Filesystem Size Used Avail Use% Mounted on
  3. /dev/sda1 441G 3.2G 415G 1% /
  4. tmpfs 36G 0 36G 0% /dev/shm
  5.  
  6.  
  7. [root@192 ~]# fdisk -l
  8. Disk /dev/sda: 480.0 GB,480047620096 bytes
  9. 255 heads,63 sectors/track,58362 cylinders
  10. Units = cylinders of 16065 * 512 = 8225280 bytes
  11. Sector size (logical/physical): 512 bytes / 512 bytes
  12. I/O size (minimum/optimal): 512 bytes / 512 bytes
  13. Disk identifier: 0x00040c3c
  14.  
  15. Device Boot Start End Blocks Id System
  16. /dev/sda1 * 1 58363 468795392 83 Linux

解决方法

虽然其他答案在某些方面有所帮助,但您的具体问题是由于平台限制和操作系统配置造成的:

>您使用消费者SATA SSDs on an HP Smart Array P410 RAID controller限制了吞吐量.在这些控制器上SATA磁盘的运行速度为3.0Gbps(3G),而不是6.0Gbps(6G).这是影响英特尔固态硬盘读取速度的障碍;每个驱动器300MB / s或更低.
> Smart Array P410控制器与SSD一起使用时具有specific requirements and best-practices.简而言之,控制器能够提供50,000 IOPS,为您的SSD容量禁用阵列加速器,性能最高可达~6个驱动器.
>磁盘性能并不总是与顺序读/写速度有关.尝试使用适当的工具(如iozonebonnie++)进行基准测试.您仍然可以获得多个驱动器的随机I / O优势.
>在操作系统级别,安装tuned-utils软件包并将配置文件设置为企业级性能,以消除文件系统中的写入障碍,并为您的设置设置正确的I / O电梯.这也包含在other questions here中.
>看起来你正在使用LVM.这也会产生影响……

以下是在同一HP Smart Array P410 RAID控制器上运行4个consumer 6G SATA SSDs(降速至3G速度)的G7 ProLiant的iozone报告.

你应该看到~470MB / s的写入和650MB / s的读取.

  1. [root@mdmarra /data/tmp]# iozone -t1 -i0 -i1 -i2 -r1m -s56g
  2. Iozone: Performance Test of File I/O
  3. Version $Revision: 3.394 $
  4. Compiled for 64 bit mode.
  5. Build: linux
  6.  
  7. Record Size 1024 KB
  8. File size set to 58720256 KB
  9. Command line used: iozone -t1 -i0 -i1 -i2 -r1m -s56g
  10. Output is in Kbytes/sec
  11. Each process writes a 58720256 Kbyte file in 1024 Kbyte records
  12.  
  13. Children see throughput for 1 initial writers = 478209.81 KB/sec
  14. Children see throughput for 1 rewriters = 478200.84 KB/sec
  15. Children see throughput for 1 readers = 677397.69 KB/sec
  16. Children see throughput for 1 re-readers = 679523.88 KB/sec
  17. Children see throughput for 1 random readers = 437344.78 KB/sec
  18. Children see throughput for 1 random writers = 486254.41 KB/sec

猜你在找的Linux相关文章