开发者社区 问答 正文

为什么自动进行均衡非常慢?

为什么自动进行均衡非常慢?

展开
收起
游客fbdr25iajcjto 2021-12-04 22:02:22 280 分享 版权
1 条回答
写回答
取消 提交回答
  • 原因:HDFS 集群默认不允许 balance 操作占用很大的网络带宽,这个带宽是可以调整的

    hdfs dfsadmin -setBalanacerBandwidth newbandwidth

    hdfs dfsadmin -setBalanacerBandwidth 10485760

    该数值的单位是字节,上面的配置是 10M/s,默认是 1M/s

    另外,也可以在 hdfs-site.xml 配置文件中进行设置:

    dfs.balance.bandwidthPerSec 10485760 Specifies the maximum bandwidth that each datanode can utilize for the balancing purpose in term of the number of bytes per second.

    sbin/start-balancer.sh -t 10% ##机器容量最高的那个值 和 最低的那个值得差距 不能超过 10%

    2021-12-04 22:03:11
    赞同 展开评论
问答地址: