linux – 添加更多主轴时ZFS写入性能不佳

前端之家收集整理的这篇文章主要介绍了linux – 添加更多主轴时ZFS写入性能不佳前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在 Linux上使用ZFS并且遇到了一个相当奇怪的症状,当我向系统添加更多磁盘时,每个驱动器写入的速度都会降低,从而有效地否定了顺序写入性能的额外主轴.

磁盘通过SAS磁盘架上的HBA(LSI 9300-8E)与主机连接

在下面的测试中,我在IO Zone上运行了以下命令
iozone -i 0 -s 10000000 -r 1024 -t 10

以下是我的测试结果:

在我的第一次测试中,我创建了一个带有12个磁盘的镜像,它显示每个磁盘每秒大约100 MB / s的写入性能.

  1. zpool create -o ashift=12 -f PoolA mirror S1_D0 S2_D0 mirror S1_D1 S2_D1 mirror
  2. S1_D2 S2_D2 mirror S1_D3 S2_D3 mirror S1_D4 S2_D4 mirror S1_D5 S2_D5
  3.  
  4. capacity operations bandwidth
  5. pool alloc free read write read write
  6. ---------- ----- ----- ----- ----- ----- -----
  7. PoolA 3.60G 10.9T 0 5.06K 0 638M
  8. mirror 612M 1.81T 0 863 0 106M
  9. S1_D0 - - 0 862 0 106M
  10. S2_D0 - - 0 943 0 116M
  11. mirror 617M 1.81T 0 865 0 107M
  12. S1_D1 - - 0 865 0 107M
  13. S2_D1 - - 0 939 0 116M
  14. mirror 613M 1.81T 0 860 0 106M
  15. S1_D2 - - 0 860 0 106M
  16. S2_D2 - - 0 948 0 117M
  17. mirror 611M 1.81T 0 868 0 107M
  18. S1_D3 - - 0 868 0 107M
  19. S2_D3 - - 0 1.02K 0 129M
  20. mirror 617M 1.81T 0 868 0 107M
  21. S1_D4 - - 0 868 0 107M
  22. S2_D4 - - 0 939 0 116M
  23. mirror 616M 1.81T 0 856 0 106M
  24. S1_D5 - - 0 856 0 106M
  25. S2_D5 - - 0 939 0 116M
  26. ---------- ----- ----- ----- ----- ----- -----

在下一次测试中,我添加了12个磁盘,总共24个磁盘,我们有效地将每个磁盘的带宽减少了一半.

  1. zpool create -o ashift=12 -f PoolA mirror S1_D0 S2_D0 mirror S1_D1 S2_D1
  2. mirror S1_D2 S2_D2 mirror S1_D3 S2_D3 mirror S1_D4 S2_D4
  3. mirror S1_D5 S2_D5 mirror S1_D6 S2_D6 mirror S1_D7 S2_D7
  4. mirror S1_D8 S2_D8 mirror S1_D9 S2_D9 mirror S1_D10 S2_D10
  5. mirror S1_D11 S2_D11
  6.  
  7. capacity operations bandwidth
  8. pool alloc free read write read write
  9. ----------- ----- ----- ----- ----- ----- -----
  10. PoolA 65.2M 21.7T 0 4.67K 0 588M
  11. mirror 6.56M 1.81T 0 399 0 49.0M
  12. S1_D0 - - 0 399 0 49.0M
  13. S2_D0 - - 0 513 0 63.1M
  14. mirror 5.71M 1.81T 0 400 0 48.7M
  15. S1_D1 - - 0 400 0 48.7M
  16. S2_D1 - - 0 515 0 62.6M
  17. mirror 6.03M 1.81T 0 396 0 49.1M
  18. S1_D2 - - 0 396 0 49.1M
  19. S2_D2 - - 0 509 0 62.9M
  20. mirror 5.89M 1.81T 0 394 0 49.0M
  21. S1_D3 - - 0 394 0 49.0M
  22. S2_D3 - - 0 412 0 51.3M
  23. mirror 5.60M 1.81T 0 400 0 49.0M
  24. S1_D4 - - 0 400 0 49.0M
  25. S2_D4 - - 0 511 0 62.9M
  26. mirror 4.65M 1.81T 0 401 0 48.9M
  27. S1_D5 - - 0 401 0 48.9M
  28. S2_D5 - - 0 511 0 62.3M
  29. mirror 5.36M 1.81T 0 397 0 49.2M
  30. S1_D6 - - 0 397 0 49.2M
  31. S2_D6 - - 0 506 0 62.5M
  32. mirror 4.88M 1.81T 0 395 0 49.2M
  33. S1_D7 - - 0 395 0 49.2M
  34. S2_D7 - - 0 509 0 63.3M
  35. mirror 5.01M 1.81T 0 393 0 48.2M
  36. S1_D8 - - 0 393 0 48.2M
  37. S2_D8 - - 0 513 0 63.0M
  38. mirror 5.00M 1.81T 0 399 0 48.7M
  39. S1_D9 - - 0 399 0 48.7M
  40. S2_D9 - - 0 513 0 62.5M
  41. mirror 5.00M 1.81T 0 398 0 49.2M
  42. S1_D10 - - 0 398 0 49.2M
  43. S2_D10 - - 0 509 0 62.8M
  44. mirror 5.55M 1.81T 0 401 0 50.0M
  45. S1_D11 - - 0 401 0 50.0M
  46. S2_D11 - - 0 506 0 63.1M
  47. ----------- ----- ----- ----- ----- ----- -----

希望有人可以说明为什么添加更多磁盘会有效地降低每个磁盘的性能.

其他要求的信息

硬件摘要

服务器

联想ThinkServer RD550,单核10至强Xeon,256GB Ram,OS在720ix控制器上的RAID 1上.

服务器HBA

LSI 9300-8e
mpt3sas_cm0:LSISAS3008:FWVersion(12.00.00.00),ChipRevision(0x02),BiosVersion(06.00.00.00)

磁盘架

磁盘架是具有双SAS控制器的Lenovo ThinkServer SA120,双电源以冗余方式连接,每个磁盘有2个路径.

磁盘架连接

磁盘架通过.5米SAS电缆连接,并通过架子以菊花链方式连接,最后一个循环返回控制器.

驱动器信息

48 x 2TB SAS驱动器希捷型号#ST2000NM0023
驱动器通过多路径配置,每个驱动器都有冗余路径.

软件摘要

操作系统/内核

CentOS 7.3
输出“uname -a”
Linux 4.9.9-1.el7.elrepo.x86_64#1 SMP Thu 2月9日11:43:40 EST 2017 x86_64 x86_64 x86_64 GNU / Linux

ZFS调整

/etc/modprobe.d/zfs.conf目前是一个空白文件,我在这里没有尝试过,顺序写入性能似乎应该随着更多磁盘而增加.

解决方法

等待更多信息……

您应该提供以下详细信息:

>磁盘的特定品牌/型号/速度/接口. (他们是SAS?SATA?)
>正在使用的特定外部JBOD机箱.
>机箱如何连接到服务器.

谁知道?您可能只是在机箱的SAS扩展器上超额订购,无法通过添加驱动器主轴进行扩展.

当然,这里也有一个调整元素.我们需要看看你对/etc/modprobe.d/zfs.conf做了哪些修改.

如果该文件为空,那么您可能错过了大量可用于ZFS构建的可调参数.

你能解释一下正在使用的操作系统吗?分布,内核和版本.

请关注我的Linux+ZFS HA guide.

你还想调整你的zfs.conf:

这是我的:

  1. #options zfs zfs_arc_max=51540000000
  2. options zfs zfs_vdev_scrub_min_active=24
  3. options zfs zfs_vdev_scrub_max_active=64
  4. options zfs zfs_vdev_sync_write_min_active=8
  5. options zfs zfs_vdev_sync_write_max_active=32
  6. options zfs zfs_vdev_sync_read_min_active=8
  7. options zfs zfs_vdev_sync_read_max_active=32
  8. options zfs zfs_vdev_async_read_min_active=8
  9. options zfs zfs_vdev_async_read_max_active=32
  10. options zfs zfs_top_maxinflight=320
  11. options zfs zfs_txg_timeout=15
  12. options zfs zfs_vdev_scheduler=deadline
  13. options zfs zfs_prefetch_disable=0
  14. options zfs l2arc_write_max=8388608
  15. options zfs l2arc_headroom=12
  16. options zfs zfs_dirty_data_max_percent=40
  17. options zfs zfs_vdev_async_write_min_active=8
  18. options zfs zfs_vdev_async_write_max_active=32
  19. options zfs zfs_immediate_write_sz=131072
  20. options zfs zil_slog_limit=536870912

猜你在找的Linux相关文章