赞
踩
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。)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。