@@ -10,7 +10,7 @@ weight: 80
10
10
11
11
<!-- overview -->
12
12
13
- In the [ scheduling-plugin] ( /docs/reference/scheduling/config/#scheduling-plugins ) ` NodeResourcesFit ` of kube-scheduler, there are two
13
+ In the [ scheduling-plugin] ( /docs/reference/scheduling/config/#scheduling-plugins ) ` NodeResourcesFit ` of kube-scheduler, there are two
14
14
scoring strategies that support the bin packing of resources: ` MostAllocated ` and ` RequestedToCapacityRatio ` .
15
15
16
16
<!-- body -->
@@ -42,7 +42,7 @@ profiles:
42
42
name : NodeResourcesFit
43
43
` ` `
44
44
45
- To learn more about other parameters and their default configuration, see the API documentation for
45
+ To learn more about other parameters and their default configuration, see the API documentation for
46
46
[` NodeResourcesFitArgs`](/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs).
47
47
48
48
# # Enabling bin packing using RequestedToCapacityRatio
@@ -55,10 +55,10 @@ configured function of the allocated resources. The behavior of the `RequestedTo
55
55
the `NodeResourcesFit` score function can be controlled by the
56
56
[scoringStrategy](/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy) field.
57
57
Within the `scoringStrategy` field, you can configure two parameters : ` requestedToCapacityRatio` and
58
- ` resources` . The `shape` in the `requestedToCapacityRatio`
59
- parameter allows the user to tune the function as least requested or most
60
- requested based on `utilization` and `score` values. The `resources` parameter
61
- consists of `name` of the resource to be considered during scoring and `weight`
58
+ ` resources` . The `shape` in the `requestedToCapacityRatio`
59
+ parameter allows the user to tune the function as least requested or most
60
+ requested based on `utilization` and `score` values. The `resources` parameter
61
+ consists of `name` of the resource to be considered during scoring and `weight`
62
62
specify the weight of each resource.
63
63
64
64
Below is an example configuration that sets
@@ -87,11 +87,11 @@ profiles:
87
87
name: NodeResourcesFit
88
88
` ` `
89
89
90
- Referencing the `KubeSchedulerConfiguration` file with the kube-scheduler
91
- flag `--config=/path/to/config/file` will pass the configuration to the
90
+ Referencing the `KubeSchedulerConfiguration` file with the kube-scheduler
91
+ flag `--config=/path/to/config/file` will pass the configuration to the
92
92
scheduler.
93
93
94
- To learn more about other parameters and their default configuration, see the API documentation for
94
+ To learn more about other parameters and their default configuration, see the API documentation for
95
95
[`NodeResourcesFitArgs`](/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs).
96
96
97
97
# ## Tuning the score function
@@ -100,10 +100,10 @@ To learn more about other parameters and their default configuration, see the AP
100
100
101
101
` ` ` yaml
102
102
shape:
103
- - utilization: 0
104
- score: 0
105
- - utilization: 100
106
- score: 10
103
+ - utilization: 0
104
+ score: 0
105
+ - utilization: 100
106
+ score: 10
107
107
` ` `
108
108
109
109
The above arguments give the node a `score` of 0 if `utilization` is 0% and 10 for
@@ -120,15 +120,15 @@ shape:
120
120
121
121
`resources` is an optional parameter which defaults to :
122
122
123
- ` ` ` yaml
123
+ ` ` ` yaml
124
124
resources:
125
125
- name: cpu
126
126
weight: 1
127
127
- name: memory
128
128
weight: 1
129
129
` ` `
130
130
131
- It can be used to add extended resources as follows :
131
+ It can be used to add extended resources as follows :
132
132
133
133
` ` ` yaml
134
134
resources:
@@ -188,8 +188,8 @@ intel.com/foo = resourceScoringFunction((2+1),4)
188
188
= (100 - ((4-3)*100/4)
189
189
= (100 - 25)
190
190
= 75 # requested + used = 75% * available
191
- = rawScoringFunction(75)
192
- = 7 # floor(75/10)
191
+ = rawScoringFunction(75)
192
+ = 7 # floor(75/10)
193
193
194
194
memory = resourceScoringFunction((256+256),1024)
195
195
= (100 -((1024-512)*100/1024))
@@ -251,4 +251,3 @@ NodeScore = (5 * 5) + (7 * 1) + (10 * 3) / (5 + 1 + 3)
251
251
252
252
- Read more about the [scheduling framework](/docs/concepts/scheduling-eviction/scheduling-framework/)
253
253
- Read more about [scheduler configuration](/docs/reference/scheduling/config/)
254
-
0 commit comments