@@ -1008,6 +1008,67 @@ Apart from these, the following properties are also available, and may be useful
10081008</tr >
10091009</table >
10101010
1011+ #### Dynamic allocation
1012+ <table class =" table " >
1013+ <tr ><th >Property Name</th ><th >Default</th ><th >Meaning</th ></tr >
1014+ <tr >
1015+ <td ><code >spark.dynamicAllocation.enabled</code ></td >
1016+ <td >false</td >
1017+ <td >
1018+ Whether to use dynamic resource allocation, which scales the number of executors registered
1019+ with this application up and down based on the workload. Note that this is currently only
1020+ available on YARN mode. For more detail, see the description
1021+ <a href="job-scheduling.html#dynamic-resource-allocation">here</a>.
1022+ <br><br>
1023+ This requires the following configurations to be set:
1024+ <code>spark.dynamicAllocation.minExecutors</code>,
1025+ <code>spark.dynamicAllocation.maxExecutors</code>, and
1026+ <code>spark.shuffle.service.enabled</code>
1027+ </td >
1028+ </tr >
1029+ <tr >
1030+ <td ><code >spark.dynamicAllocation.minExecutors</code ></td >
1031+ <td >(none)</td >
1032+ <td >
1033+ Lower bound for the number of executors if dynamic allocation is enabled (required).
1034+ </td >
1035+ </tr >
1036+ <tr >
1037+ <td ><code >spark.dynamicAllocation.maxExecutors</code ></td >
1038+ <td >(none)</td >
1039+ <td >
1040+ Upper bound for the number of executors if dynamic allocation is enabled (required).
1041+ </td >
1042+ </tr >
1043+ <tr >
1044+ <td ><code >spark.dynamicAllocation.schedulerBacklogTimeout</code ></td >
1045+ <td >60</td >
1046+ <td >
1047+ If dynamic allocation is enabled and there have been pending tasks backlogged for more than
1048+ this duration (in seconds), new executors will be requested. For more detail, see this
1049+ <a href="job-scheduling.html#resource-allocation-policy">description</a>.
1050+ </td >
1051+ </tr >
1052+ <tr >
1053+ <td ><code >spark.dynamicAllocation.sustainedSchedulerBacklogTimeout</code ></td >
1054+ <td ><code >schedulerBacklogTimeout</code ></td >
1055+ <td >
1056+ Same as <code>spark.dynamicAllocation.schedulerBacklogTimeout</code>, but used only for
1057+ subsequent executor requests. For more detail, see this
1058+ <a href="job-scheduling.html#resource-allocation-policy">description</a>.
1059+ </td >
1060+ </tr >
1061+ <tr >
1062+ <td ><code >spark.dynamicAllocation.executorIdleTimeout</code ></td >
1063+ <td >600</td >
1064+ <td >
1065+ If dynamic allocation is enabled and an executor has been idle for more than this duration
1066+ (in seconds), the executor will be removed. For more detail, see this
1067+ <a href="job-scheduling.html#resource-allocation-policy">description</a>.
1068+ </td >
1069+ </tr >
1070+ </table >
1071+
10111072#### Security
10121073<table class =" table " >
10131074<tr ><th >Property Name</th ><th >Default</th ><th >Meaning</th ></tr >
@@ -1142,67 +1203,6 @@ Apart from these, the following properties are also available, and may be useful
11421203</tr >
11431204</table >
11441205
1145- #### Dynamic allocation
1146- <table class =" table " >
1147- <tr ><th >Property Name</th ><th >Default</th ><th >Meaning</th ></tr >
1148- <tr >
1149- <td ><code >spark.dynamicAllocation.enabled</code ></td >
1150- <td >false</td >
1151- <td >
1152- Enabling dynamic allocations and removals of executors based on the workload.
1153- The add policy depends on whether there are backlogged tasks waiting to be scheduled. If
1154- the scheduler queue is not drained in N seconds, then new executors are added.
1155- N is configured via spark.dynamicAllocation.schedulerBacklogTimeout and
1156- spark.dynamicAllocation.sustainedSchedulerBacklogTimeout.
1157- If the queue persists for another M seconds, then more executors are added and so on.
1158- M is configured via spark.dynamicAllocation.executorIdleTimeout.
1159- The number added in each round increases exponentially from the previous round until an upper bound on the
1160- number of executors has been reached. The upper bound is based both on a configured property
1161- and on the number of tasks pending: the policy will never increase the number of executor
1162- requests past the number needed to handle all pending tasks.
1163- To enable this feature, spark.dynamicAllocation.minExecutors and
1164- spark.dynamicAllocation.maxExecutors must be configured.
1165- Note that spark.shuffle.service.enabled need to be also true if cluster mode is YARN.
1166- </td >
1167- </tr >
1168- <tr >
1169- <td ><code >spark.dynamicAllocation.minExecutors</code ></td >
1170- <td >-1</td >
1171- <td >
1172- Minimum value of executors when dynamic allocation is enabled.
1173- </td >
1174- </tr >
1175- <tr >
1176- <td ><code >spark.dynamicAllocation.maxExecutors</code ></td >
1177- <td >-1</td >
1178- <td >
1179- Maximum value of executors when dynamic allocation is enabled.
1180- </td >
1181- </tr >
1182- <tr >
1183- <td ><code >spark.dynamicAllocation.schedulerBacklogTimeout</code ></td >
1184- <td >60</td >
1185- <td >
1186- If there are backlogged tasks for this duration, add new executors.
1187- </td >
1188- </tr >
1189- <tr >
1190- <td ><code >spark.dynamicAllocation.sustainedSchedulerBacklogTimeout</code ></td >
1191- <td >60</td >
1192- <td >
1193- If the backlog is sustained for this duration, add more executors.
1194- This is used only after the initial backlog timeout is exceeded.
1195- </td >
1196- </tr >
1197- <tr >
1198- <td ><code >spark.dynamicAllocation.executorIdleTimeout</code ></td >
1199- <td >600</td >
1200- <td >
1201- If an executor has been idle for this duration, remove it.
1202- </td >
1203- </tr >
1204- </table >
1205-
12061206#### Cluster Managers
12071207Each cluster manager in Spark has additional configuration options. Configurations
12081208can be found on the pages for each mode:
0 commit comments