You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/16 18:38:47 UTC
[GitHub] [spark] holdenk commented on a change in pull request #35870: [SPARK-38562][K8S][DOCS] Add doc for `Volcano` scheduler
holdenk commented on a change in pull request #35870:
URL: https://github.com/apache/spark/pull/35870#discussion_r828309309
##########
File path: docs/running-on-kubernetes.md
##########
@@ -1722,6 +1722,83 @@ spec:
image: will-be-overwritten
```
+#### Using Volcano as Customized Scheduler for Spark on Kubernetes
+
+##### Prerequisites
+* Volcano supports Spark on Kubernetes since v1.5. Mini version: v1.5.1+. See also [Volcano installation](https://volcano.sh/en/docs/installation).
+
+##### Usage
+Spark on Kubernetes allows using Volcano as a customized scheduler. Users can use Volcano to
+support more advanced resource scheduling: queue scheduling, resource reservation, priority scheduling, for example:
+
+```
+# Specify volcano scheduler
+--conf spark.kubernetes.scheduler.name=volcano
+# Specify driver/executor VolcanoFeatureStep
+--conf spark.kubernetes.driver.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep
+--conf spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep
+# Specify PodGroup template
+--conf spark.kubernetes.scheduler.volcano.podGroupTemplateFile=/path/to/podgroup-template.yaml
+```
+
+##### Volcano Feature Step
+Volcano feature steps help users to create Volcano PodGroup and set driver/executor pod annotation to link this PodGroup.
+
+Note that, currently only supported driver/job level PodGroup in Volcano Feature Step, executor separate PodGroup is not supported yet.
+
+##### Volcano PodGroup Template
+Volcano defines PodGroup spec using [CRD yaml](https://volcano.sh/en/docs/podgroup/#example)
+
+Similar to [Pod template](#pod-template), Spark users can similarly use Volcano PodGroup Template to define the PodGroup spec configurations.
+
+To do so, specify the spark properties `spark.kubernetes.scheduler.volcano.podGroupTemplateFile` to point to files accessible to the `spark-submit` process.
+
+Below is an example of PodGroup template, see also [PodGroup Introduction](https://volcano.sh/en/docs/podgroup/#introduction):
+
+```
+apiVersion: scheduling.volcano.sh/v1beta1
+kind: PodGroup
+spec:
+ # Specify minMember to 1 to make driver
+ minMember: 1
+ # Specify minResources to support resource reservation
+ minResources:
+ cpu: "2"
+ memory: "3Gi"
+ # Specify the priority
+ priorityClassName: high-priority
+ queue: default
+```
+
+##### Features
+<table class="table">
+<tr><th>Scheduling</th><th>Description</th><th>Configuration</th></tr>
+<tr>
+ <td>Queue scheduling</td>
+ <td>
+ Queue indicates the resource queue, which adopts FIFO. is also used as the basis for resource division.
+ help users specify which queue the job to submit.
+ </td>
+ <td>`spec.queue` field in PodGroup template</td>
+</tr>
+<tr>
+ <td>Resource reservation</td>
+ <td>
+ Resource reservation, aka `Gang` scheduling (start all or nothing), helps users reserve resources for specific jobs.
+ It's useful for ensuring resource are meet the minimum requirements of spark job and avoiding all drivers stuck
+ due to all executor pending, especially, when cluster resources are very limited.
+ </td>
+ <td>`spec.minResources` field in PodGroup template</td>
+</tr>
+<tr>
+ <td>Priority scheduling</td>
+ <td>
+ It is used to help users to specify job priority in the queue during scheduling.
Review comment:
Maybe add a link here
##########
File path: docs/running-on-kubernetes.md
##########
@@ -1722,6 +1722,83 @@ spec:
image: will-be-overwritten
```
+#### Using Volcano as Customized Scheduler for Spark on Kubernetes
+
+##### Prerequisites
+* Volcano supports Spark on Kubernetes since v1.5. Mini version: v1.5.1+. See also [Volcano installation](https://volcano.sh/en/docs/installation).
Review comment:
+1 clarifying versions
##########
File path: docs/running-on-kubernetes.md
##########
@@ -1722,6 +1722,83 @@ spec:
image: will-be-overwritten
```
+#### Using Volcano as Customized Scheduler for Spark on Kubernetes
+
+##### Prerequisites
+* Volcano supports Spark on Kubernetes since v1.5. Mini version: v1.5.1+. See also [Volcano installation](https://volcano.sh/en/docs/installation).
+
+##### Usage
+Spark on Kubernetes allows using Volcano as a customized scheduler. Users can use Volcano to
+support more advanced resource scheduling: queue scheduling, resource reservation, priority scheduling, for example:
+
+```
+# Specify volcano scheduler
+--conf spark.kubernetes.scheduler.name=volcano
+# Specify driver/executor VolcanoFeatureStep
+--conf spark.kubernetes.driver.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep
+--conf spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep
+# Specify PodGroup template
+--conf spark.kubernetes.scheduler.volcano.podGroupTemplateFile=/path/to/podgroup-template.yaml
+```
+
+##### Volcano Feature Step
+Volcano feature steps help users to create Volcano PodGroup and set driver/executor pod annotation to link this PodGroup.
+
+Note that, currently only supported driver/job level PodGroup in Volcano Feature Step, executor separate PodGroup is not supported yet.
+
+##### Volcano PodGroup Template
+Volcano defines PodGroup spec using [CRD yaml](https://volcano.sh/en/docs/podgroup/#example)
+
+Similar to [Pod template](#pod-template), Spark users can similarly use Volcano PodGroup Template to define the PodGroup spec configurations.
+
+To do so, specify the spark properties `spark.kubernetes.scheduler.volcano.podGroupTemplateFile` to point to files accessible to the `spark-submit` process.
+
+Below is an example of PodGroup template, see also [PodGroup Introduction](https://volcano.sh/en/docs/podgroup/#introduction):
+
+```
+apiVersion: scheduling.volcano.sh/v1beta1
+kind: PodGroup
+spec:
+ # Specify minMember to 1 to make driver
+ minMember: 1
+ # Specify minResources to support resource reservation
+ minResources:
+ cpu: "2"
+ memory: "3Gi"
+ # Specify the priority
+ priorityClassName: high-priority
+ queue: default
+```
+
+##### Features
+<table class="table">
+<tr><th>Scheduling</th><th>Description</th><th>Configuration</th></tr>
+<tr>
+ <td>Queue scheduling</td>
+ <td>
+ Queue indicates the resource queue, which adopts FIFO. is also used as the basis for resource division.
+ help users specify which queue the job to submit.
+ </td>
+ <td>`spec.queue` field in PodGroup template</td>
+</tr>
+<tr>
+ <td>Resource reservation</td>
+ <td>
+ Resource reservation, aka `Gang` scheduling (start all or nothing), helps users reserve resources for specific jobs.
+ It's useful for ensuring resource are meet the minimum requirements of spark job and avoiding all drivers stuck
Review comment:
I think maybe, `It is useful for ensource the available resources meet the minimum requirements of the Spark job and avoiding the situation where drivers are scheduled and then they are unable to schedule sufficient executors to progress.`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org