栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

优化tez引擎-资源限制

优化tez引擎-资源限制

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。)
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/443524.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号