加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

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

发布时间:2020-12-14 03:05:01 所属栏目:Linux 来源:网络整理
导读:我在 Linux上使用ZFS并且遇到了一个相当奇怪的症状,当我向系统添加更多磁盘时,每个驱动器写入的速度都会降低,从而有效地否定了顺序写入性能的额外主轴. 磁盘通过SAS磁盘架上的HBA(LSI 9300-8E)与主机连接 在下面的测试中,我在IO Zone上运行了以下命令 iozone
我在 Linux上使用ZFS并且遇到了一个相当奇怪的症状,当我向系统添加更多磁盘时,每个驱动器写入的速度都会降低,从而有效地否定了顺序写入性能的额外主轴.

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

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

以下是我的测试结果:

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

zpool create -o ashift=12 -f PoolA mirror S1_D0 S2_D0 mirror S1_D1 S2_D1 mirror 
S1_D2 S2_D2 mirror S1_D3 S2_D3 mirror S1_D4 S2_D4 mirror S1_D5 S2_D5

              capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
PoolA       3.60G  10.9T      0  5.06K      0   638M
  mirror     612M  1.81T      0    863      0   106M
    S1_D0       -      -      0    862      0   106M
    S2_D0       -      -      0    943      0   116M
  mirror     617M  1.81T      0    865      0   107M
    S1_D1       -      -      0    865      0   107M
    S2_D1       -      -      0    939      0   116M
  mirror     613M  1.81T      0    860      0   106M
    S1_D2       -      -      0    860      0   106M
    S2_D2       -      -      0    948      0   117M
  mirror     611M  1.81T      0    868      0   107M
    S1_D3       -      -      0    868      0   107M
    S2_D3       -      -      0  1.02K      0   129M
  mirror     617M  1.81T      0    868      0   107M
    S1_D4       -      -      0    868      0   107M
    S2_D4       -      -      0    939      0   116M
  mirror     616M  1.81T      0    856      0   106M
    S1_D5       -      -      0    856      0   106M
    S2_D5       -      -      0    939      0   116M
----------  -----  -----  -----  -----  -----  -----

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

zpool create -o ashift=12 -f PoolA mirror S1_D0 S2_D0 mirror S1_D1 S2_D1 
mirror S1_D2 S2_D2 mirror S1_D3 S2_D3 mirror S1_D4 S2_D4 
mirror S1_D5 S2_D5 mirror S1_D6 S2_D6 mirror S1_D7 S2_D7 
mirror S1_D8 S2_D8 mirror S1_D9 S2_D9 mirror S1_D10 S2_D10 
mirror S1_D11 S2_D11

                capacity     operations    bandwidth
pool         alloc   free   read  write   read  write
-----------  -----  -----  -----  -----  -----  -----
PoolA        65.2M  21.7T      0  4.67K      0   588M
  mirror     6.56M  1.81T      0    399      0  49.0M
    S1_D0        -      -      0    399      0  49.0M
    S2_D0        -      -      0    513      0  63.1M
  mirror     5.71M  1.81T      0    400      0  48.7M
    S1_D1        -      -      0    400      0  48.7M
    S2_D1        -      -      0    515      0  62.6M
  mirror     6.03M  1.81T      0    396      0  49.1M
    S1_D2        -      -      0    396      0  49.1M
    S2_D2        -      -      0    509      0  62.9M
  mirror     5.89M  1.81T      0    394      0  49.0M
    S1_D3        -      -      0    394      0  49.0M
    S2_D3        -      -      0    412      0  51.3M
  mirror     5.60M  1.81T      0    400      0  49.0M
    S1_D4        -      -      0    400      0  49.0M
    S2_D4        -      -      0    511      0  62.9M
  mirror     4.65M  1.81T      0    401      0  48.9M
    S1_D5        -      -      0    401      0  48.9M
    S2_D5        -      -      0    511      0  62.3M
  mirror     5.36M  1.81T      0    397      0  49.2M
    S1_D6        -      -      0    397      0  49.2M
    S2_D6        -      -      0    506      0  62.5M
  mirror     4.88M  1.81T      0    395      0  49.2M
    S1_D7        -      -      0    395      0  49.2M
    S2_D7        -      -      0    509      0  63.3M
  mirror     5.01M  1.81T      0    393      0  48.2M
    S1_D8        -      -      0    393      0  48.2M
    S2_D8        -      -      0    513      0  63.0M
  mirror     5.00M  1.81T      0    399      0  48.7M
    S1_D9        -      -      0    399      0  48.7M
    S2_D9        -      -      0    513      0  62.5M
  mirror     5.00M  1.81T      0    398      0  49.2M
    S1_D10       -      -      0    398      0  49.2M
    S2_D10       -      -      0    509      0  62.8M
  mirror     5.55M  1.81T      0    401      0  50.0M
    S1_D11       -      -      0    401      0  50.0M
    S2_D11       -      -      0    506      0  63.1M
-----------  -----  -----  -----  -----  -----  -----

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

其他要求的信息

硬件摘要

服务器

联想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:

这是我的:

#options zfs zfs_arc_max=51540000000
options zfs zfs_vdev_scrub_min_active=24
options zfs zfs_vdev_scrub_max_active=64
options zfs zfs_vdev_sync_write_min_active=8
options zfs zfs_vdev_sync_write_max_active=32
options zfs zfs_vdev_sync_read_min_active=8
options zfs zfs_vdev_sync_read_max_active=32
options zfs zfs_vdev_async_read_min_active=8
options zfs zfs_vdev_async_read_max_active=32
options zfs zfs_top_maxinflight=320
options zfs zfs_txg_timeout=15
options zfs zfs_vdev_scheduler=deadline
options zfs zfs_prefetch_disable=0
options zfs l2arc_write_max=8388608
options zfs l2arc_headroom=12
options zfs zfs_dirty_data_max_percent=40
options zfs zfs_vdev_async_write_min_active=8
options zfs zfs_vdev_async_write_max_active=32
options zfs zfs_immediate_write_sz=131072
options zfs zil_slog_limit=536870912

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读