Skip to content

Commit cd50ba9

Browse files
Docs(Plugins): Refactor plugins to be a submenu under Scheduler- Refactored Plugins to be a submenu under Scheduler menu- Migrated existing plugin content to separate files- Created plugins-overview.md as the parent menu item- Split 11 plugins into separate documentation files: * Gang, Binpack, Priority, DRF, Proportion * Task-topology, Predicates, Nodeorder * SLA, TDM, Numa-aware- Applied to both English and Chinese documentation- Removed old plugins.md files- Fixed blog post dateday format issuesStructure: Scheduler > Plugins (submenu) > Individual Plugin Pages
1 parent be7dac3 commit cd50ba9

33 files changed

+3168
-359
lines changed

content/en/blog/Meet Cloud Native Batch Computing with Volcano in AI & Big Data Scenarios.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ date = 2024-03-08
77
lastmod = 2024-03-08
88
datemonth = "Mar"
99
dateyear = "2024"
10-
dateday = 08
10+
dateday = "08"
1111

1212
draft = false # Is this a draft? true/false
1313
toc = true # Show table of contents? true/false

content/en/blog/Volcano-1.11.0-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ date = 2025-02-07
77
lastmod = 2025-02-07
88
datemonth = "Feb"
99
dateyear = "2025"
10-
dateday = 07
10+
dateday = "07"
1111

1212
draft = false # Is this a draft? true/false
1313
toc = true # Show table of contents? true/false

content/en/blog/how-volcano-boosts-distributed-training-and-inference-performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ date = 2025-04-01
77
lastmod = 2025-04-01
88
datemonth = "Apr"
99
dateyear = "2025"
10-
dateday = 01
10+
dateday = "01"
1111

1212
draft = false # Is this a draft? true/false
1313
toc = true # Show table of contents? true/false

content/en/docs/binpack.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
+++
2+
title = "Binpack"
3+
4+
date = 2021-05-13
5+
lastmod = 2025-11-11
6+
7+
draft = false # Is this a draft? true/false
8+
toc = true # Show table of contents? true/false
9+
type = "docs" # Do not modify.
10+
11+
# Add menu entry to sidebar.
12+
linktitle = "Binpack"
13+
[menu.docs]
14+
parent = "plugins"
15+
weight = 5
16+
+++
17+
18+
## Overview
19+
20+
The goal of the Binpack scheduling algorithm is to fill existing nodes as much as possible (trying not to allocate to empty nodes). In the concrete implementation, the Binpack scheduling algorithm scores the nodes that can accommodate the task, with higher scores indicating higher resource utilization rates. The Binpack algorithm can fill up nodes as much as possible, consolidating application loads on some nodes, which is very conducive to the Kubernetes cluster's node auto-scaling functionality.
21+
22+
## How It Works
23+
24+
The Binpack algorithm is injected into the Volcano Scheduler process as a plugin and is applied during the node selection stage for Pods. When calculating the Binpack score, the Volcano Scheduler considers various resources requested by the Pod and averages them according to the weights configured for each resource.
25+
26+
Key characteristics:
27+
28+
- **Resource Weight**: Each resource type (CPU, Memory, GPU, etc.) can have a different weight in the scoring calculation, depending on the weight value configured by the administrator.
29+
- **Plugin Weight**: Different plugins also need to be assigned different weights when calculating node scores. The scheduler also sets score weights for the Binpack plugin.
30+
- **NodeOrderFn**: The plugin implements the NodeOrderFn to score nodes based on how efficiently they would be utilized after placing the task.
31+
32+
## Scenario
33+
34+
The Binpack algorithm is beneficial for small jobs that can fill as many nodes as possible:
35+
36+
### Big Data Scenarios
37+
38+
Single query jobs in big data processing benefit from Binpack by consolidating workloads and maximizing resource utilization on active nodes.
39+
40+
### E-commerce High Concurrency
41+
42+
Order generation in e-commerce flash sale scenarios can leverage Binpack to efficiently use available resources during peak loads.
43+
44+
### AI Inference
45+
46+
Single identification jobs in AI inference scenarios benefit from consolidated scheduling, reducing resource fragmentation.
47+
48+
### Internet Services
49+
50+
High concurrency service scenarios on the Internet benefit from Binpack by reducing fragmentation within nodes and reserving sufficient resource space on idle machines for Pods that have applied for more resource requests, maximizing the utilization of idle resources in the cluster.
51+
52+
## Configuration
53+
54+
The Binpack plugin is configured in the scheduler ConfigMap with optional weight parameters:
55+
56+
```yaml
57+
tiers:
58+
- plugins:
59+
- name: binpack
60+
arguments:
61+
binpack.weight: 10
62+
binpack.cpu: 1
63+
binpack.memory: 1
64+
binpack.resources: nvidia.com/gpu
65+
binpack.resources.nvidia.com/gpu: 2
66+
```
67+
68+
### Configuration Parameters
69+
70+
| Parameter | Description | Default |
71+
|-----------|-------------|---------|
72+
| `binpack.weight` | Overall weight of the Binpack plugin score | 1 |
73+
| `binpack.cpu` | Weight for CPU resource in scoring | 1 |
74+
| `binpack.memory` | Weight for Memory resource in scoring | 1 |
75+
| `binpack.resources` | Additional resources to consider | - |
76+
| `binpack.resources.<resource>` | Weight for specific resource type | 1 |
77+
78+
## Example
79+
80+
Here's an example scheduler configuration that uses Binpack to prioritize node filling:
81+
82+
```yaml
83+
apiVersion: v1
84+
kind: ConfigMap
85+
metadata:
86+
name: volcano-scheduler-configmap
87+
namespace: volcano-system
88+
data:
89+
volcano-scheduler.conf: |
90+
actions: "enqueue, allocate, backfill"
91+
tiers:
92+
- plugins:
93+
- name: priority
94+
- name: gang
95+
- plugins:
96+
- name: predicates
97+
- name: nodeorder
98+
- name: binpack
99+
arguments:
100+
binpack.weight: 10
101+
binpack.cpu: 2
102+
binpack.memory: 1
103+
```
104+
105+
In this configuration, the Binpack plugin is given a weight of 10, and CPU is weighted twice as much as memory in the scoring calculation.

content/en/docs/drf.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
+++
2+
title = "DRF"
3+
4+
date = 2021-05-13
5+
lastmod = 2025-11-11
6+
7+
draft = false # Is this a draft? true/false
8+
toc = true # Show table of contents? true/false
9+
type = "docs" # Do not modify.
10+
11+
# Add menu entry to sidebar.
12+
linktitle = "DRF"
13+
[menu.docs]
14+
parent = "plugins"
15+
weight = 7
16+
+++
17+
18+
{{<figure library="1" src="drfjob.png" title="DRF Plugin">}}
19+
20+
## Overview
21+
22+
The full name of the DRF scheduling algorithm is **Dominant Resource Fairness**, which is a scheduling algorithm based on the container group's Dominant Resource. The Dominant Resource is the largest percentage of all required resources for a container group relative to the total cluster resources.
23+
24+
The DRF algorithm selects the container group with the smallest Dominant Resource share for priority scheduling. This approach can accommodate more jobs without allowing a single resource-heavy job to starve a large number of smaller jobs. The DRF scheduling algorithm ensures that in an environment where many types of resources coexist, the fair allocation principle is satisfied as much as possible.
25+
26+
## How It Works
27+
28+
The DRF plugin:
29+
30+
1. **Observes Dominant Resource**: For each job, it identifies which resource (CPU, Memory, GPU, etc.) represents the largest share of cluster resources
31+
2. **Calculates Share Value**: Computes each job's share value based on its dominant resource usage
32+
3. **Prioritizes Lower Share**: Jobs with lower share values (using less of their dominant resource) get higher scheduling priority
33+
34+
Key functions implemented:
35+
36+
- **JobOrderFn**: Orders jobs based on their dominant resource share, giving priority to jobs with smaller shares
37+
- **PreemptableFn**: Determines if a job can be preempted based on resource fairness calculations
38+
39+
The plugin attempts to calculate the total amount of resources allocated to the preemptor and preempted tasks, triggering preemption when the preemptor task has fewer resources.
40+
41+
## Scenario
42+
43+
The DRF scheduling algorithm gives priority to the throughput of businesses in the cluster and is suitable for batch processing scenarios:
44+
45+
### AI Training
46+
47+
Single AI training jobs benefit from DRF as it ensures fair resource allocation across multiple training workloads.
48+
49+
### Big Data Processing
50+
51+
Single big data calculation and query jobs can share resources fairly with other workloads in the cluster.
52+
53+
### Mixed Resource Workloads
54+
55+
In environments with diverse resource requirements (CPU-intensive, Memory-intensive, GPU-intensive jobs), DRF ensures fair allocation across all resource dimensions.
56+
57+
## Configuration
58+
59+
The DRF plugin is configured in the scheduler ConfigMap:
60+
61+
```yaml
62+
tiers:
63+
- plugins:
64+
- name: priority
65+
- name: gang
66+
- plugins:
67+
- name: drf
68+
- name: predicates
69+
- name: proportion
70+
```
71+
72+
## Example
73+
74+
Consider a cluster with the following resources:
75+
- 100 CPUs
76+
- 400 GB Memory
77+
78+
And two jobs:
79+
- **Job A**: Each task requires 2 CPUs and 8 GB Memory
80+
- **Job B**: Each task requires 1 CPU and 32 GB Memory
81+
82+
For Job A:
83+
- CPU share per task: 2/100 = 2%
84+
- Memory share per task: 8/400 = 2%
85+
- Dominant resource: CPU and Memory are equal (2%)
86+
87+
For Job B:
88+
- CPU share per task: 1/100 = 1%
89+
- Memory share per task: 32/400 = 8%
90+
- Dominant resource: Memory (8%)
91+
92+
With DRF, Job A would be scheduled first because its dominant resource share (2%) is smaller than Job B's (8%). This ensures that neither job can monopolize the cluster by requesting large amounts of a single resource.
93+
94+
### VolcanoJob Example
95+
96+
```yaml
97+
apiVersion: batch.volcano.sh/v1alpha1
98+
kind: Job
99+
metadata:
100+
name: drf-example-job
101+
spec:
102+
schedulerName: volcano
103+
minAvailable: 2
104+
tasks:
105+
- replicas: 2
106+
name: worker
107+
template:
108+
spec:
109+
containers:
110+
- name: worker
111+
image: busybox
112+
resources:
113+
requests:
114+
cpu: "2"
115+
memory: "8Gi"
116+
limits:
117+
cpu: "2"
118+
memory: "8Gi"
119+
```

content/en/docs/gang.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
+++
2+
title = "Gang"
3+
4+
date = 2021-05-13
5+
lastmod = 2025-11-11
6+
7+
draft = false # Is this a draft? true/false
8+
toc = true # Show table of contents? true/false
9+
type = "docs" # Do not modify.
10+
11+
# Add menu entry to sidebar.
12+
linktitle = "Gang"
13+
[menu.docs]
14+
parent = "plugins"
15+
weight = 4
16+
+++
17+
18+
{{<figure library="1" src="gang.png" title="Gang Plugin">}}
19+
20+
## Overview
21+
22+
The Gang scheduling strategy is one of the core scheduling algorithms of the Volcano Scheduler. It meets the scheduling requirements of "All or nothing" in the scheduling process and avoids the waste of cluster resources caused by arbitrary scheduling of Pods. The Gang scheduler algorithm observes whether the scheduled number of Pods under a Job meets the minimum number of runs. When the minimum number of runs of Job is satisfied, the scheduling action is executed for all Pods under the Job; otherwise, it is not executed.
23+
24+
## How It Works
25+
26+
The Gang plugin considers tasks not in the `Ready` state (including Binding, Bound, Running, Allocated, Succeed, and Pipelined) as having a higher priority. It checks whether the resources allocated to the queue can meet the resources required by the task to run `minAvailable` pods after trying to evict some pods and reclaim resources. If yes, the Gang plugin will proceed with scheduling.
27+
28+
Key functions implemented by the Gang plugin:
29+
30+
- **JobReadyFn**: Checks if a job has enough resources to meet its `minAvailable` requirement
31+
- **JobPipelinedFn**: Checks if a job can be pipelined
32+
- **JobValidFn**: Validates if a job's Gang constraint is satisfied
33+
34+
## Scenario
35+
36+
The Gang scheduling algorithm based on the container group concept is well suited for scenarios that require multi-process collaboration:
37+
38+
### AI and Deep Learning
39+
40+
AI scenes often contain complex processes including Data Ingestion, Data Analysts, Data Splitting, Trainers, Serving, and Logging. These require a group of containers to work together, making them suitable for the container-based Gang scheduling strategy.
41+
42+
### MPI and HPC
43+
44+
Multi-thread parallel computing communication scenarios under the MPI computing framework are also suitable for Gang scheduling because master and slave processes need to work together. Containers under the container group are highly correlated, and there may be resource contention. Overall scheduling allocation can effectively solve deadlock situations.
45+
46+
### Resource Efficiency
47+
48+
In the case of insufficient cluster resources, the Gang scheduling strategy can significantly improve the utilization of cluster resources by preventing partial job allocations that would waste resources waiting for other tasks.
49+
50+
## Configuration
51+
52+
The Gang plugin is typically enabled by default and configured in the scheduler ConfigMap:
53+
54+
```yaml
55+
tiers:
56+
- plugins:
57+
- name: priority
58+
- name: gang
59+
- name: conformance
60+
```
61+
62+
## Example
63+
64+
Here's an example of a VolcanoJob that uses Gang scheduling:
65+
66+
```yaml
67+
apiVersion: batch.volcano.sh/v1alpha1
68+
kind: Job
69+
metadata:
70+
name: tensorflow-job
71+
spec:
72+
minAvailable: 3 # Gang constraint: at least 3 pods must be schedulable
73+
schedulerName: volcano
74+
tasks:
75+
- replicas: 1
76+
name: ps
77+
template:
78+
spec:
79+
containers:
80+
- name: tensorflow
81+
image: tensorflow/tensorflow:latest
82+
- replicas: 2
83+
name: worker
84+
template:
85+
spec:
86+
containers:
87+
- name: tensorflow
88+
image: tensorflow/tensorflow:latest
89+
```
90+
91+
In this example, the job will only be scheduled if all 3 pods (1 ps + 2 workers) can be allocated resources simultaneously.

0 commit comments

Comments
 (0)