Skip to content

Commit

Permalink
Updated theoretical node commit, secondary improvement, separate commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jayunit100 committed Sep 7, 2016
1 parent 1b18b3b commit 2049440
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/devel/scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ indicating where the Pod should be scheduled.
```

The Scheduler tries to find a node for each Pod, one at a time. Notices pods via watch.
- First it applies a set of "predicates" to filter out inappropriate nodes inappropriate nodes. For example, if the PodSpec specifies resource requests, then the scheduler will filter out nodes that don't have at least that much resources available (computed as the capacity of the node minus the sum of the resource requests of the containers that are already running on the node).
The Scheduler tries to find a node for each Pod, one at a time.
- First it applies a set of "predicates" to filter out inappropriate nodes. For example, if the PodSpec specifies resource requests, then the scheduler will filter out nodes that don't have at least that much resources available (computed as the capacity of the node minus the sum of the resource requests of the containers that are already running on the node).
- Second, it applies a set of "priority functions"
that rank the nodes that weren't filtered out by the predicate check. For example, it tries to spread Pods across nodes and zones while at the same time favoring the least-loaded nodes (where "load" here is sum of the resource requests of the containers running on the node,
divided by the node's capacity).
that rank the nodes that weren't filtered out by the predicate check. For example, it tries to spread Pods across nodes and zones while at the same time favoring the least (theoretically) loaded nodes (where "load" - in theory - is measured as the sum of the resource requests of the containers running on the node, divided by the node's capacity).
- Finally, the node with the highest priority is chosen (or, if there are multiple such nodes, then one of them is chosen at random). The code for this main scheduling loop is in the function `Schedule()` in [plugin/pkg/scheduler/generic_scheduler.go](http://releases.k8s.io/HEAD/plugin/pkg/scheduler/generic_scheduler.go)

## Scheduler extensibility
Expand Down

0 comments on commit 2049440

Please sign in to comment.