spark配置参数设置
driver.memory :driver运行内存,默认值512m,一般2-6G
num-executors :集群中启动的executor总数
executor.memory :每个executor分配的内存数,默认值512m,一般4-8G
executor.cores :每个executor分配的核心数目
yarn.am.memory :AppMaster内存,默认值512m
yarn.am.memoryOverhead :am堆外内存,值为 AM memory * 0.07, 最小384
yarn.driver.memoryOverhead :driver堆外内存,Max(384MB, 7% of spark.executor.memory)
yarn.executor.memoryOverhead :executor堆外内存,值为 executorMemory * 0.07, 最小384
每个executor从Yarn请求的内存 =
executor.memory + yarn.executor.memoryOverhead
spark on yarn模式,yarn资源管理设置
yarn.app.mapreduce.am.resource.mb :AM能够申请的最大内存,默认值为1G,一般1-2G
yarn.nodemanager.resource.memory-mb :nodemanager能够申请的最大内存,默认值为8G
yarn.scheduler.maximum-allocation-mb :调度时一个container能够申请的最大资源,默认值为8G