Skip to content

Commit d42f1eb

Browse files
authored
Merge pull request #777 from darrenstahlmsft/WindowsCpuMaximum
Change Windows CPU Percent to Maximum
2 parents 13895d6 + 7d007ca commit d42f1eb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

config-windows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ The following parameters can be specified:
4040

4141
* **`shares`** *(uint16, OPTIONAL)* - specifies the relative weight to other containers with CPU shares.
4242

43-
* **`percent`** *(uint, OPTIONAL)* - specifies the percentage of available CPUs usable by the container.
43+
* **`maximum`** *(uint, OPTIONAL)* - specifies the portion of processor cycles that this container can use as a percentage times 100.
4444

4545
#### Example
4646

4747
```json
4848
"windows": {
4949
"resources": {
5050
"cpu": {
51-
"percent": 50
51+
"maximum": 5000
5252
}
5353
}
5454
}

schema/config-windows.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"id": "https://opencontainers.org/schema/bundle/windows/resources/cpu/shares",
3535
"$ref": "defs-windows.json#/definitions/cpuShares"
3636
},
37-
"percent": {
38-
"id": "https://opencontainers.org/schema/bundle/windows/resources/cpu/percent",
39-
"$ref": "defs.json#/definitions/percent"
37+
"maximum": {
38+
"id": "https://opencontainers.org/schema/bundle/windows/resources/cpu/maximum",
39+
"$ref": "defs.json#/definitions/uint16"
4040
}
4141
}
4242
},

specs-go/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,8 @@ type WindowsCPUResources struct {
460460
Count *uint64 `json:"count,omitempty"`
461461
// CPU shares (relative weight to other containers with cpu shares). Range is from 1 to 10000.
462462
Shares *uint16 `json:"shares,omitempty"`
463-
// Percent of available CPUs usable by the container.
464-
Percent *uint8 `json:"percent,omitempty"`
463+
// Specifies the portion of processor cycles that this container can use as a percentage times 100.
464+
Maximum *uint16 `json:"maximum,omitempty"`
465465
}
466466

467467
// WindowsStorageResources contains storage resource management settings.

0 commit comments

Comments
 (0)