Skip to content

Commit 753e70c

Browse files
authored
Merge pull request #29487 from borgerli/main
Change CPU and Memory to lowercase because resoure name is case-sensitive
2 parents b1b1395 + 34d7331 commit 753e70c

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ shape:
9292

9393
``` yaml
9494
resources:
95-
- name: CPU
95+
- name: cpu
9696
weight: 1
97-
- name: Memory
97+
- name: memory
9898
weight: 1
9999
```
100100

@@ -104,9 +104,9 @@ It can be used to add extended resources as follows:
104104
resources:
105105
- name: intel.com/foo
106106
weight: 5
107-
- name: CPU
107+
- name: cpu
108108
weight: 3
109-
- name: Memory
109+
- name: memory
110110
weight: 1
111111
```
112112

@@ -123,16 +123,16 @@ Requested resources:
123123

124124
```
125125
intel.com/foo : 2
126-
Memory: 256MB
127-
CPU: 2
126+
memory: 256MB
127+
cpu: 2
128128
```
129129

130130
Resource weights:
131131

132132
```
133133
intel.com/foo : 5
134-
Memory: 1
135-
CPU: 3
134+
memory: 1
135+
cpu: 3
136136
```
137137

138138
FunctionShapePoint {{0, 0}, {100, 10}}
@@ -142,13 +142,13 @@ Node 1 spec:
142142
```
143143
Available:
144144
intel.com/foo: 4
145-
Memory: 1 GB
146-
CPU: 8
145+
memory: 1 GB
146+
cpu: 8
147147
148148
Used:
149149
intel.com/foo: 1
150-
Memory: 256MB
151-
CPU: 1
150+
memory: 256MB
151+
cpu: 1
152152
```
153153

154154
Node score:
@@ -161,13 +161,13 @@ intel.com/foo = resourceScoringFunction((2+1),4)
161161
= rawScoringFunction(75)
162162
= 7 # floor(75/10)
163163
164-
Memory = resourceScoringFunction((256+256),1024)
164+
memory = resourceScoringFunction((256+256),1024)
165165
= (100 -((1024-512)*100/1024))
166166
= 50 # requested + used = 50% * available
167167
= rawScoringFunction(50)
168168
= 5 # floor(50/10)
169169
170-
CPU = resourceScoringFunction((2+1),8)
170+
cpu = resourceScoringFunction((2+1),8)
171171
= (100 -((8-3)*100/8))
172172
= 37.5 # requested + used = 37.5% * available
173173
= rawScoringFunction(37.5)
@@ -182,12 +182,12 @@ Node 2 spec:
182182
```
183183
Available:
184184
intel.com/foo: 8
185-
Memory: 1GB
186-
CPU: 8
185+
memory: 1GB
186+
cpu: 8
187187
Used:
188188
intel.com/foo: 2
189-
Memory: 512MB
190-
CPU: 6
189+
memory: 512MB
190+
cpu: 6
191191
```
192192

193193
Node score:
@@ -200,13 +200,13 @@ intel.com/foo = resourceScoringFunction((2+2),8)
200200
= rawScoringFunction(50)
201201
= 5
202202
203-
Memory = resourceScoringFunction((256+512),1024)
203+
memory = resourceScoringFunction((256+512),1024)
204204
= (100 -((1024-768)*100/1024))
205205
= 75
206206
= rawScoringFunction(75)
207207
= 7
208208
209-
CPU = resourceScoringFunction((2+6),8)
209+
cpu = resourceScoringFunction((2+6),8)
210210
= (100 -((8-8)*100/8))
211211
= 100
212212
= rawScoringFunction(100)

0 commit comments

Comments
 (0)