-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Official documentation on Poseidon/Firmament, a new multi-scheduler support for K8S. #11752
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8a3c35d
Added documentation about Poseidon-Firmament scheduler
anvithks c80a5e3
Fixed some style issues.
anvithks d0e8f73
Udpated the document as per the review comments.
anvithks 9aa2fa9
Fixed some typos and updated the document
anvithks c5a72db
Updated the document as per the review comments.
anvithks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
content/en/docs/concepts/configuration/poseidon-firmament-alternate-scheduler.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
title: Poseidon-Firmament - An alternate scheduler | ||
content_template: templates/concept | ||
weight: 80 | ||
--- | ||
|
||
{{% capture overview %}} | ||
|
||
Poseidon is the [Firmament scheduler](https://github.com/Huawei-PaaS/firmament) integration for Kubernetes. At a very high level, Poseidon/Firmament scheduler augments the current Kubernetes scheduling capabilities by incorporating a new novel flow network graph based scheduling capabilities alongside the default Kubernetes Scheduler. It models the scheduling problem as a constraint-based optimization over a flow network graph – by reducing scheduling to a min-cost max-flow optimization problem. | ||
|
||
{{% /capture %}} | ||
|
||
{{% capture body %}} | ||
|
||
|
||
## Introduction | ||
|
||
Poseidon is the [Firmament scheduler](https://github.com/Huawei-PaaS/firmament) integration for Kubernetes. At a very high level, Poseidon/Firmament scheduler augments the current Kubernetes scheduling capabilities by incorporating a new novel flow network graph based scheduling capabilities alongside the default Kubernetes Scheduler. It models the scheduling problem as a constraint-based optimization over a flow network graph – by reducing scheduling to a min-cost max-flow optimization problem. | ||
|
||
Due to the inherent rescheduling capabilities, the new scheduler enables a globally optimal scheduling environment that constantly keeps refining the workloads placements dynamically. | ||
|
||
Poseidon/Firmament scheduler runs alongside the default Kubernetes Scheduler as an alternate scheduler – multiple schedulers running simultaneously. As part of the Kubernetes multiple schedulers support, each new pod is typically scheduled by the default scheduler, but Kubernetes can be instructed to use another scheduler by specifying the name of another custom scheduler (“Poseidon” in our case) in the PodSpec at the time of pod creation. In this case, the default scheduler will ignore that Pod and allow Poseidon scheduler to schedule the Pod on a relevant node. | ||
|
||
## Key Advantages | ||
|
||
### Flow graph scheduling based Poseidon/Firmament scheduler provides the following key advantages: | ||
- Workloads (pods) are bulk scheduled for enabling scheduling decisions at massive scale. | ||
- Based on the extensive performance test results, Poseidon/Firmament scales much better than Kubernetes default scheduler as the number of nodes increase in a cluster. This is due to the fact that Poseidon/Firmament is able to amortize more and more work across workloads. | ||
- Poseidon/Firmament Scheduler outperforms K8S default scheduler by a wide margin when it comes to throughput performance numbers for scenarios where compute resource requirements are somewhat uniform across jobs (Replicasets/Deployments/Jobs). As shown in the graph below, Poseidon/Firmament scheduler end-to-end throughput performance numbers (including bind time) consistently get better and better as the number of nodes in a cluster increase. For example, for a 2,700 nodes cluster (shown in the graph below), Poseidon/Firmament scheduler is 7X (or more) better end-to-end throughput-wise that includes bind time. | ||
|
||
- Availability of complex rule constraints. | ||
- Scheduling in Firmament is very dynamic; it keeps cluster resources in a global optimal state during every scheduling run. | ||
- Highly efficient resource utilizations. | ||
|
||
## Poseidon-Firmament Scheduler - How it works | ||
|
||
As part of the Kubernetes multiple schedulers support, each new pod is typically scheduled by the default scheduler, but Kubernetes can be instructed to use another scheduler by specifying the name of another custom scheduler (“Poseidon” in our case) in the PodSpec at the time of pod creation. In this case, the default scheduler will ignore that Pod and allow Poseidon scheduler to schedule the Pod on a relevant node. | ||
|
||
|
||
{{< note >}} | ||
For details about the design of this project see the [design document](https://github.com/kubernetes-sigs/poseidon/blob/master/docs/design/README.md). | ||
{{< /note >}} | ||
|
||
## Possible Use Case Scenarios - When to use it | ||
|
||
As mentioned earlier, Poseidon/Firmament scheduler enables extremely high throughput scheduling environment at scale due to its bulk scheduling approach superiority versus K8S pod-at-a-time approach. In our extensive tests, we have observed substantial throughput benefits as long as resource requirements (CPU/Memory) for incoming Pods are uniform across jobs (Replicasets/Deployments/Jobs), mainly due to efficient amortization of work across jobs. | ||
|
||
Although, Poseidon/Firmament scheduler is capable of scheduling various types of workloads (service, batch, etc.), following are the few use cases where it excels the most: | ||
1. For “Big Data/AI” jobs consisting of large number of tasks, throughput benefits are tremendous. | ||
2. Substantial throughput benefits also for service or batch job scenarios where workload resource requirements are uniform across jobs (Replicasets/Deployments/Jobs). | ||
|
||
## Current Project Stage | ||
|
||
- **Alpha Release - Incubation repo.** at https://github.com/kubernetes-sigs/poseidon. | ||
- Currently, Poseidon-Firmament scheduler **does not provide support for high availability**, our implementation assumes that the scheduler cannot fail. The [design document](https://github.com/kubernetes-sigs/poseidon/blob/master/docs/design/README.md) describes possible ways to enable high availability, but we leave this to future work. | ||
- We are **not aware of any production deployment** of Poseidon-Firmament scheduler at this time. | ||
|
||
## Features Comparison Matrix | ||
|
||
|
||
|Feature|Kubernetes Default Scheduler|Poseidon/Firmament Scheduler|Notes| | ||
|--- |--- |--- |--- | | ||
|Node Affinity/Anti-Affinity|Y|Y|| | ||
|Pod Affinity/Anti-Affinity - including support for pod anti-affinity symmetry|Y|Y|Currently, the default scheduler outperforms the Poseidon/Firmament scheduler pod affinity/anti-affinity functionality. We are working towards resolving this.| | ||
|Taints & Tolerations|Y|Y|| | ||
|Baseline Scheduling capability in accordance to available compute resources (CPU & Memory) on a node|Y|Y**|Not all Predicates & Priorities are supported at this time.| | ||
|Extreme Throughput at scale|Y**|Y|This is due to Poseidon/Firmament bulk scheduling approach superiority versus K8S pod-at-a-time approach. Substantial throughput benefits using Firmament scheduler as long as resource requirements (CPU/Memory) for incoming Pods is uniform across Replicasets/Deployments/Jobs. This is mainly due to efficient amortization of work across Replicasets/Deployments/Jobs . 1) For “Big Data/AI” jobs consisting of large no. of tasks, throughput benefits are tremendous. 2) Substantial throughput benefits also for service or batch job scenarios where workload resource requirements are uniform across Replicasets/Deployments/Jobs.| | ||
|Optimal Scheduling|Pod-by-Pod scheduler, processes one pod at a time (may result into sub-optimal scheduling)|Bulk Scheduling (Optimal scheduling)|Pod-by-Pod K8S default scheduler may assign tasks to a sub-optimal machine. By contrast, Firmament considers all unscheduled tasks at the same time together with their soft and hard constraints.| | ||
|Colocation Interference Avoidance|N|N**|Planned in Poseidon/Firmament.| | ||
|Priority Pre-emption|Y|N**|Partially exists in Poseidon/Firmament versus extensive support in K8S default scheduler.| | ||
|Inherent Re-Scheduling|N|Y**|Poseidon/Firmament scheduler supports workload re-scheduling. In each scheduling run it considers all the pods, including running pods, and as a result can migrate or evict pods – a globally optimal scheduling environment.| | ||
|Gang Scheduling|N|Y|| | ||
|Support for Pre-bound Persistence Volume Scheduling|Y|Y|| | ||
|Support for Local Volume & Dynamic Persistence Volume Binding Scheduling|Y|N**|Planned.| | ||
|High Availability|Y|N**|Planned.| | ||
|Real-time metrics based scheduling|N|Y**|Initially supported using Heapster (now deprecated) for placing pods using actual cluster utilization statistics rather than reservations. Plans to switch over to "metric server".| | ||
|Support for Max-Pod per node|Y|Y|Poseidon/Firmament scheduler seamlessly co-exists with K8S default scheduler.| | ||
|Support for Ephemeral Storage, in addition to CPU/Memory|Y|Y|This feature was working earlier. However, for some reason since K8S release 1.10 onwards it does not seem to work as expected. We are looking at resolving the issue soon.| | ||
|
||
|
||
## Installation | ||
|
||
In-cluster installation of Poseidon, please start [here](https://github.com/kubernetes-sigs/poseidon/blob/master/docs/install/README.md). | ||
|
||
|
||
## Development | ||
|
||
For developers please refer [here](https://github.com/kubernetes-sigs/poseidon/blob/master/docs/devel/README.md). | ||
|
||
## Latest Performance Testing Results | ||
|
||
### Scheduling time of Pods with CPU/Mem requirements only (without bind time) | ||
|
||
![Scheduling time of Pods with CPU/Mem requirements only (without bind time)](/images/docs/perf-test-result-1.png) | ||
|
||
### Scheduling time of Pods with CPU/Mem requirements only (including bind time) | ||
![Scheduling time of Pods with CPU/Mem requirements only (including bind time)](/images/docs/perf-test-result-2.png) | ||
|
||
### Total time for 10k Pods and Throughput Pods/sec using Scheduler Perf. | ||
![Total time for 10k Pods and Throughput Pods/sec using Scheduler Perf.](/images/docs/perf-test-result-3.png) | ||
|
||
### Scheduling time of Pods with Affinity requirements | ||
![Scheduling time of Pods with Affinity requirements](/images/docs/perf-test-result-4.png) | ||
|
||
### Scheduling time of Pods with Affinity requirements | ||
![Scheduling time of Pods with Affinity requirements](/images/docs/perf-test-result-5.png) | ||
|
||
### Scheduling time of Symmetry Pods | ||
![Scheduling time of Symmetry Pods](/images/docs/perf-test-result-6.png) | ||
|
||
{{% /capture %}} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a section to note what features of Kubernetes is not yet supported. For example, dynamic volume binding is not supported yet.
Also, point out where Poseidon may be slower than the default scheduler, for example, for pods with inter-pod affinity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsalamat At the moment we have a "Feature Comparison Matrix" table that compares the Default scheduler with Poseidon/Firmament Scheduler. It also has notes with respect to what is currently supported, what is not and what is planned.
This table has been updated now.
Please check and let us now if you feel something is missing.