Skip to content

Commit 61a1229

Browse files
authored
Merge pull request #39271 from Zhuzhenghao/en/resource-bin-package
Tweak page style for resource-bin-packing.md
2 parents c1afea0 + 87e8d21 commit 61a1229

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

content/en/docs/concepts/scheduling-eviction/resource-bin-packing.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ weight: 80
1010

1111
<!-- overview -->
1212

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
1414
scoring strategies that support the bin packing of resources: `MostAllocated` and `RequestedToCapacityRatio`.
1515

1616
<!-- body -->
@@ -42,7 +42,7 @@ profiles:
4242
name: NodeResourcesFit
4343
```
4444
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
4646
[`NodeResourcesFitArgs`](/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs).
4747

4848
## Enabling bin packing using RequestedToCapacityRatio
@@ -55,10 +55,10 @@ configured function of the allocated resources. The behavior of the `RequestedTo
5555
the `NodeResourcesFit` score function can be controlled by the
5656
[scoringStrategy](/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy) field.
5757
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`
6262
specify the weight of each resource.
6363

6464
Below is an example configuration that sets
@@ -87,11 +87,11 @@ profiles:
8787
name: NodeResourcesFit
8888
```
8989

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
9292
scheduler.
9393

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
9595
[`NodeResourcesFitArgs`](/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs).
9696

9797
### Tuning the score function
@@ -100,10 +100,10 @@ To learn more about other parameters and their default configuration, see the AP
100100

101101
```yaml
102102
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
107107
```
108108

109109
The above arguments give the node a `score` of 0 if `utilization` is 0% and 10 for
@@ -120,15 +120,15 @@ shape:
120120

121121
`resources` is an optional parameter which defaults to:
122122

123-
``` yaml
123+
```yaml
124124
resources:
125125
- name: cpu
126126
weight: 1
127127
- name: memory
128128
weight: 1
129129
```
130130

131-
It can be used to add extended resources as follows:
131+
It can be used to add extended resources as follows:
132132

133133
```yaml
134134
resources:
@@ -188,8 +188,8 @@ intel.com/foo = resourceScoringFunction((2+1),4)
188188
= (100 - ((4-3)*100/4)
189189
= (100 - 25)
190190
= 75 # requested + used = 75% * available
191-
= rawScoringFunction(75)
192-
= 7 # floor(75/10)
191+
= rawScoringFunction(75)
192+
= 7 # floor(75/10)
193193
194194
memory = resourceScoringFunction((256+256),1024)
195195
= (100 -((1024-512)*100/1024))
@@ -251,4 +251,3 @@ NodeScore = (5 * 5) + (7 * 1) + (10 * 3) / (5 + 1 + 3)
251251

252252
- Read more about the [scheduling framework](/docs/concepts/scheduling-eviction/scheduling-framework/)
253253
- Read more about [scheduler configuration](/docs/reference/scheduling/config/)
254-

0 commit comments

Comments
 (0)