Change Windows CPU Percent to Maximum

In order to increase the granularity of CPU resource control, change
the CPU Percent (0-100) resource setting to CPU Maximum (0-10000)

Signed-off-by: Darren Stahl <darst@microsoft.com>
This commit is contained in:
Darren Stahl 2017-04-21 14:12:21 -07:00
parent 13895d6074
commit 7d007ca1d4
3 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@ The following parameters can be specified:
* **`shares`** *(uint16, OPTIONAL)* - specifies the relative weight to other containers with CPU shares.
* **`percent`** *(uint, OPTIONAL)* - specifies the percentage of available CPUs usable by the container.
* **`maximum`** *(uint, OPTIONAL)* - specifies the portion of processor cycles that this container can use as a percentage times 100.
#### Example
@ -48,7 +48,7 @@ The following parameters can be specified:
"windows": {
"resources": {
"cpu": {
"percent": 50
"maximum": 5000
}
}
}

View File

@ -34,9 +34,9 @@
"id": "https://opencontainers.org/schema/bundle/windows/resources/cpu/shares",
"$ref": "defs-windows.json#/definitions/cpuShares"
},
"percent": {
"id": "https://opencontainers.org/schema/bundle/windows/resources/cpu/percent",
"$ref": "defs.json#/definitions/percent"
"maximum": {
"id": "https://opencontainers.org/schema/bundle/windows/resources/cpu/maximum",
"$ref": "defs.json#/definitions/uint16"
}
}
},

View File

@ -460,8 +460,8 @@ type WindowsCPUResources struct {
Count *uint64 `json:"count,omitempty"`
// CPU shares (relative weight to other containers with cpu shares). Range is from 1 to 10000.
Shares *uint16 `json:"shares,omitempty"`
// Percent of available CPUs usable by the container.
Percent *uint8 `json:"percent,omitempty"`
// Specifies the portion of processor cycles that this container can use as a percentage times 100.
Maximum *uint16 `json:"maximum,omitempty"`
}
// WindowsStorageResources contains storage resource management settings.