When to Disable Speculative Execution

Backgrounds

Below is the link from WikiMedia about what’s SE (Speculative Execution). In Hadoop, the following parameters string are for this settings. And, they are true by default.

  • mapred.map.tasks.speculative.execution
  • mapred.reduce.tasks.speculative.execution

When to Disable
Most time, it helps. However, I am here to collect some scenario when we do not need it.
  1. Of course, when ever your cluster really in shortage of resource or for the purpose of experiment, we can disable them by setting them to false since “SE” really a big resource consumer
  2. It is generally advisable to turn off ”SE” for mapred jobs that use HBase as a source. Especially for longer running jobs, speculative execution will create duplicate map-tasks which will double-write your data to HBase; this is probably not what you want. In addition, its local data has high priority when you mapred running against resource in HBase. That is to say every task in tasktracker stays closer to the regionserver in the same physical server. The “SE” will create new jobs to access data which may not local. As result, it will make your regionserver overloaded by wasting IO and network resource.
  3. When moving data using distcp, the source cluster should have speculative execution turned off for map tasks. In the mapredsite.xml configuration file, set mapred.map.tasks.speculative.execution to false. This will prevent any undefined behavior from occurring in the case where a map task fails.

How to Disable
There are two ways to disable it.
  • Set in mapred-site.xml (recommend for admin and wider user having such request)
             <property>  
             <name>mapred.map.tasks.speculative.execution</name>  
             <value>false</value>  
             </property>  
             <property>  
             <name>mapred.reduce.tasks.speculative.execution</name>  
             <value>false</value>  
             </property>
  • Set in job configuration
        jobconf.set("mapred.map.tasks.speculative.execution",false);
        jobconf.set("mapred.reduce.tasks.speculative.execution",false);

Issues
MAPREDUCE-2062 and  MAPREDUCE-3895 list some problem on “SE”. See if you needs improvements if you have to use.

Reference: http://dataworld.blog.com/2013/04/22/when-to-disable-speculative-execution/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值