Scheduling Workloads
Volcano is a Kubernetes-based batch processing platform with high-performance general computing capabilities like task scheduling engine, heterogeneous chip management, and task running management. It provides end users with computing frameworks from multiple domains such as AI, big data, gene, and rendering. It also offers job scheduling, job management, and queue management for computing applications.
Kubernetes typically uses its default scheduler to schedule workloads. To use Volcano, specify Volcano for your workloads. For details about the Kubernetes scheduler, see Specify schedulers for pods.
Notes and Constraints
If you schedule a lot of workloads, Volcano will generate a significant number of logs. To prevent the node hosting Volcano from running out of disk space, use Volcano with LTS.
Using Volcano
When using Volcano to schedule workloads, you only need to configure schedulerName in the spec field of the pod and set the parameter to volcano. The following is an example:
- Use YAML to create a queue.apiVersion: scheduling.volcano.sh/v1beta1kind: Queuemetadata:name: q1spec:reclaimable: trueweight: 1
- Set schedulerName in the spec field of the pod to volcano.apiVersion: apps/v1kind: Deploymentmetadata:name: nginxlabels:app: nginxspec:replicas: 4selector:matchLabels:app: nginxtemplate:metadata:annotations:# Submit the job to the q1 queue.scheduling.volcano.sh/queue-name: "q1"volcano.sh/preemptable: "true"labels:app: nginxspec:# Specify Volcano as the scheduler.schedulerName: volcanocontainers:- name: nginximage: nginximagePullPolicy: IfNotPresentresources:limits:cpu: 1memory: 100Mirequests:cpu: 1memory: 100Miports:- containerPort: 80
Additionally, Volcano supports the workload queues and preemption, which can be implemented through pod annotations. The following table lists the supported annotations.
Pod Annotations | Description |
---|---|
scheduling.volcano.sh/queue-name: "<queue-name>" | Specifies the queue to which the workload belongs. <queue-name> indicates the queue name. |
volcano.sh/preemptable: "true" | Indicates whether a job can be preempted. If this function is enabled, the job can be preempted. Options:
|
You can obtain pod details to check whether the pod is scheduled by Volcano to the allocated queue.
- Run the following command to check the pod details and obtain the scheduling.k8s.io/group-name value:kubectl describe pod <pod_name>
The scheduling.k8s.io/group-name value of the pod is displayed.
- Check whether the pod is scheduled by Volcano to the allocated queue.kubectl describe pg <group_name>
Command output:
Spec:Min Member: 1Min Resources:Cpu: 100mMemory: 100MiQueue: q1Status:Conditions:Last Transition Time: 2023-05-30T01:54:43ZReason: tasks in gang are ready to be scheduledStatus: TrueTransition ID: 70be1d7d-3532-41e0-8324-c7644026b38fType: ScheduledPhase: RunningEvents:Type Reason Age From Message---- ------ ---- ---- -------Normal Scheduled 0s (x3 over 2s) volcano pod group is ready
- Notes and Constraints
- Using Volcano