From 20494401f8b173981e6413ce24aa929e43ae44a3 Mon Sep 17 00:00:00 2001 From: jayunit100 Date: Thu, 1 Sep 2016 13:59:20 -0400 Subject: [PATCH] Updated theoretical node commit, secondary improvement, separate commit --- docs/devel/scheduler.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/devel/scheduler.md b/docs/devel/scheduler.md index f699dabcbbb..f4321e68472 100755 --- a/docs/devel/scheduler.md +++ b/docs/devel/scheduler.md @@ -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