MAPREDUCE服务 MRS-常用参数:Dynamic Allocation

时间:2024-04-10 09:06:18

Dynamic Allocation

动态资源调度是On Yarn模式特有的特性,并且必须开启Yarn External Shuffle才能使用这个功能。在使用Spark作为一个常驻的服务时候,动态资源调度将大大的提高资源的利用率。例如JDBCServer服务,大多数时间该进程并不接受JDBC请求,因此将这段空闲时间的资源释放出来,将极大的节约集群的资源。

表5 参数说明

参数

描述

默认值

spark.dynamicAllocation.enabled

是否使用动态资源调度,用于根据规模调整注册于该应用的executor的数量。注意目前仅在YARN模式下有效。

启用动态资源调度必须将spark.shuffle.service.enabled设置为true。以下配置也与此相关:spark.dynamicAllocation.minExecutors、spark.dynamicAllocation.maxExecutors和spark.dynamicAllocation.initialExecutors。

  • JDBCServer2x:

    true

  • SparkResource2x:

    false

spark.dynamicAllocation.minExecutors

最小Executor个数。

0

spark.dynamicAllocation.initialExecutors

初始Executor个数。

spark.dynamicAllocation.minExecutors

spark.dynamicAllocation.maxExecutors

最大executor个数。

2048

spark.dynamicAllocation.schedulerBacklogTimeout

调度第一次超时时间。单位为秒。

1s

spark.dynamicAllocation.sustainedSchedulerBacklogTimeout

调度第二次及之后超时时间。

1s

spark.dynamicAllocation.executorIdleTimeout

普通Executor空闲超时时间。单位为秒。

60

spark.dynamicAllocation.cachedExecutorIdleTimeout

含有cached blocks的Executor空闲超时时间。

  • JDBCServer2x:2147483647s
  • IndexServer2x:2147483647s
  • SparkResource2x:120
support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_1931.html