spark参数调优系列 目录地址:
https://blog.csdn.net/zyzzxycj/article/details/81011540
⑩ Dynamic Allocation 动态分配
spark.dynamicAllocation.enabled
是否开启动态资源配置,根据工作负载来衡量是否应该增加或减少executor,默认false
以下相关参数:
spark.dynamicAllocation.minExecutors
动态分配最小executor个数,在启动时就申请好的,默认0
spark.dynamicAllocation.maxExecutors
动态分配最大executor个数,默认infinity
spark.dynamicAllocation.initialExecutors
动态分配初始executor个数默认值=spark.dynamicAllocation.minExecutors
spark.dynamicAllocation.executorIdleTimeout
当某个executor空闲超过这个设定值,就会被kill,默认60s
spark.dynamicAllocation.cachedExecutorIdleTimeout
当某个缓存数据的executor空闲时间超过这个设定值,就会被kill,默认infinity
spark.dynamicAllocation.schedulerBacklogTimeout
任务队列非空,资源不够,申请executor的时间间隔,默认1s
spark.dynamicAllocation.sustainedSchedulerBacklogTimeout
同schedulerBacklogTimeout,是申请了新executor之后继续申请的间隔,默认=schedulerBacklogTimeout