hadoop集群负载不均衡及balance工具详解
来源:互联网 发布:小众品牌知乎 编辑:程序博客网 时间:2024/05/01 09:37
在线上的hadoop集群运维过程中,hadoop 的balance工具通常用于平衡hadoop集群中各datanode中的文件块分布,以避免出现部分datanode磁盘占用率高的问题(这问题也很有可能导致该节点CPU使用率较其他服务器高)。
可能的原因:
1. 突然磁盘使用率变高而文件块数并没有很大的增加,极有可能是出现某个用户的作业产生大量大的文件,排查删除掉就课可以。注意将trash中的也要删除掉
2.也有可能是长期使用造成的,请查清楚每个节点的负载情况,进行排序,然后处理。
下付balance工具的一些说明,可以参考http://blog.csdn.net/azhao_dn/article/details/7741666
1) hadoop balance工具的用法:
- To start:
- bin/start-balancer.sh [-threshold <threshold>]
- Example: bin/ start-balancer.sh
- start the balancer with a default threshold of 10%
- bin/ start-balancer.sh -threshold 5
- start the balancer with a threshold of 5%
- To stop:
- bin/ stop-balancer.sh
-threshold 默认设置:10,参数取值范围:0-100,参数含义:判断集群是否平衡的目标参数,每一个 datanode 存储使用率和集群总存储使用率的差值都应该小于这个阀值 ,理论上,该参数设置的越小,整个集群就越平衡,但是在线上环境中,hadoop集群在进行balance时,还在并发的进行数据的写入和删除,所以有可能无法到达设定的平衡参数值。
dfs.balance.bandwidthPerSec 默认设置:1048576(1 M/S),参数含义:设置balance工具在运行中所能占用的带宽,设置的过大可能会造成mapred运行缓慢
3)hadoop balance工具其他特点:
balance工具在运行过程中,迭代的将文件块从高使用率的datanode移动到低使用率的datanode上,每一个迭代过程中移动的数据量不超过下面两个值的较小者:10G或者指定阀值*容量,且每次迭代不超过20分钟。每次迭代结束后,balance工具将更新该datanode的文件块分布情况。以下为官方文档英文描述:
- The tool moves blocks from highly utilized datanodes to poorly utilized datanodes
- iteratively. In each iteration a datanode moves or receives no more than the lesser of 10G
- bytes or the threshold fraction of its capacity. Each iteration runs no more than 20
- minutes. At the end of each iteration, the balancer obtains updated datanodes information
- from the namenode.
参考资料:
http://blog.csdn.net/azhao_dn/article/details/7741666
- hadoop集群负载不均衡及balance工具详解
- hadoop集群balance工具详解
- hadoop集群balance工具详解
- hadoop集群balance工具详解
- hadoop集群balance工具详解
- (hadoop运维 三) hadoop集群负载均衡
- Tomcat load balance and clustering - tomcat负载均衡和集群
- flume-ng负载均衡load-balance、failover集群搭建
- flume-ng负载均衡load-balance、failover集群搭建
- flume-ng负载均衡load-balance、failover集群搭建
- flume-ng负载均衡load-balance、failover集群搭建
- flume-ng负载均衡load-balance、failover集群搭建
- 负载均衡LVS集群详解
- 负载均衡LVS集群详解
- 负载均衡LVS集群详解
- 负载均衡(Load Balance)
- 负载均衡 load balance
- 负载均衡(load balance)
- 什么情况下使用Cron
- 九月
- ajax实现异步加载页面,实现信息实时更新
- (step 8.2.10)hdu 1729(Stone Game——NIM游戏变形)
- Opencv聚类函数 partition()
- hadoop集群负载不均衡及balance工具详解
- QTableWidget的用法总结
- ROBOT框架下启动IE的小问题与解决办法
- 3-5乘法表问题
- 微知识]模块的封装(一):C语言类的封装
- [WIP] Fedora 17上部署Ceph ( by quqi99 )
- C++中静态类型和动态类型
- 使用JDK自带jvisualvm监控tomcat
- vc++6.0软件出错 (一)