ccah-500 第9题 How would you tune your io.sort.mb value to achieve maximum memory to disk I/O ratio?

9.You observed that the number of spilled records from Map tasks far exceeds the number of map output records. Your child heap size is 1GB and your io.sort.mb value is set to 1000MB. How would you tune your io.sort.mb value to achieve maximum memory to disk I/O ratio? 

A. For a 1GB child heap size an io.sort.mb of 128 MB will always maximize memory to disk I/O 

B. Increase the io.sort.mb to 1GB 

C. Decrease the io.sort.mb value to 0 

D. Tune the io.sort.mb value until you observe that the number of spilled records equals (or is as close to equals) the number of map output records. 

 

Answer: D 

 

reference

http://www.aiotestking.com/cloudera/how-would-you-tune-your-iosortmb-value-to-achieve-maximum-memory-to-disk-io-ratio-3/

io.sort.mb - This sets the size of memory buffer used during sort operations. This buffer is contained within the map/reduce task’s JVM heap as defined in mapred.child.java.opts. If this buffer size is too small for the amount of input data, it can lead to intermediate spills to disk and which will later need to be read and merged. Increasing this value will reduce or eliminate the number of intermediate spills going to disk and reduce the overall I/O load on your system.
Default value: 100 Mb
Recommended value: Use 1/4 to 1/2 of the map/reduce task Java heap size setting (in mapred.child.java.opts).
Auto-tuned value: 1/2 of the map/reduce Java heap size

 

Reference from the book ” Hadoop Operations” of Eric Sammer:

“The value of io.sort.mbis specified in megabytes and, by default, is 100.
Increasing the size of this buffer results in fewer spills to disk and, as a consequence, reduces the number of spill files that must be merged when the map task completes.

The io.sort.mbparameter is one way administrators and job developers can trade more memory for reduced disk IO.

The downside of this is that this buffer must be contained within the child task’s JVM heap allocation, as defined by mapred.child.java.opts.
For example, with a child heap size of 1GB and io.sort.mbset to 128, only 896MB is really available to the user’s code

Remember that ultimately, all records output by map tasks must be spilled so,
in the ideal scenario, these numbers are equal.”

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值