hadoop性能调优笔记
?
官方解释:The maximum number of map tasks that will be run??simultaneously by a task tracker.
?
我的理解:一个tasktracker最多可以同时运行的map任务数量
?
默认值:2
?
优化值:mapred.tasktracker.map.tasks.maximum = cpu数量
?
cpu数量 = 服务器CPU总核数 / 每个CPU的核数官方的解释:The default number of map tasks per job
?
我的解释:一个Job会使用task tracker的map任务槽数量,这个值 ≤?mapred.tasktracker.map.tasks.maximum
?
默认值:2
?
优化值:
?
注意:map任务的数量是由input spilit决定的,和上面两个参数无关
?
官方解释:The maximum number of reduce tasks that will be run??simultaneously by a task tracker.
?
我的理解:一个task tracker最多可以同时运行的reduce任务数量
?
默认值:2
?
优化值:?(CPU数量 > 2) ? (CPU数量 * 0.50): 1 (mapr的官方建议)
?
官方解释:The default number of reduce tasks per job. Typically set to 99%??of the cluster's reduce capacity, so that if a node fails the reduces can??still be executed in a single wave.
?
我的理解:一个Job会使用task tracker的reduce任务槽数量
?
默认值:1
?
优化值:
理由:启用95%的reduce任务槽运行task, recude task运行一轮就可以完成。剩余5%的任务槽永远失败任务,重新执行
理由:因为reduce task数量超过reduce槽数,所以需要两轮才能完成所有reduce task。具体快的原理我没有完全理解,上原文:
?
?? ?hadoop官方wiki: 写道
At 1.75 the faster nodes will finish their first round of reduces and launch a second round of reduces doing a much better job of load balancing.?
disable ipv6配置,修改bin/hadoop,添加下行:
?
?
HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true"?
?
?
官方 写道The default number of reduce tasks per job. Typically set?
?
我的理解tasktracker执行hive job的reduce任务数,设置为"-1"hive将自动设置该值,策略如下:?
默认值:-1
?
优化值:显式设置为Hadoop配置中mapred.reduce.tasks值,参考上文。
?
参考资料:
?
?
http://wiki.apache.org/hadoop/HowManyMapsAndReduces
http://www.mapr.com/doc/display/MapR/mapred-site.xml
http://hi.baidu.com/dtzw/blog/item/5b64880aaf057d33b0351db4.html
http://www.tbdata.org/archives/622
http://developer.yahoo.com/hadoop/tutorial/module7.html