当前位置:   article > 正文

优化tez引擎-资源限制_tez.am.resource.memory.mb

tez.am.resource.memory.mb
1. 参数
set tez.am.resource.memory.mb=4096;                                     // 与yarn.scheduler.minimum-allocate-mb YARN最小容器大小相同
set tez.runtime.io.sort.mb=1638;                                        // hive.tez.container.size的40%
set hive.auto.convert.join.noconditionaltask.size=1431655765;           // hive.tez.container.size的1/3
set tez.runtime.unordered.output.buffer.size-mb=409;                    // hive.tez.container.size的10%
set tez.am.container.reuse.enabled=true;                                // Container重用开关,打开提高效率
set tez.grouping.split-count=139;                                       // 分片根据数据量大小定义
set hive.tez.container.size=4096;                                       // 每个容器设置4G大小


2. 说明:
任务核心使用=分片数   
任务内存总使用=分片数*容器大小

tez.runtime.io.sort.mb是当需要对输出进行排序的内存。
tez.runtime.unordered.output.buffer.size-mb是输出不需要排序的内存。
hive.auto.convert.join.noconditionaltask.size是一个非常重要的参数,用于设置执行Map join时的内存大小。
tez.am.resource.memory.mb设置为与yarn.scheduler.minimum-allocate-mb YARN最小容器大小相同。 
hive.tez.container.size设置为与yarn.scheduler.minimum-allocation-mb大小相同或小倍数(1或2倍),但不能超过yarn.scheduler.maximum-allocation-mb。
tez.runtime.io.sort.mb为hive.tez.container.size的40%,不应该超过2gb。
hive.auto.convert.join.noconditionaltask.size为hive.tez.container.size的1/3
tez.runtime.unordered.output.buffer.size-mb为hive.tez.container.size的10%


3. 优化方法:
1) 调集群参数
2) 拆步骤, 使用临时表减少算力
3) 优化语法
4) 加资源


4. 例子:
insert overwrite table wh.xxx_211102
select * from wh.xxx;
(测试结果: 根据第一步的参数: 450G数据量, 消耗160核心,消耗内存600多G。)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/寸_铁/article/detail/833832
推荐阅读
相关标签
  

闽ICP备14008679号