Skip to content

Commit

Permalink
Merge pull request opencontainers#777 from darrenstahlmsft/WindowsCpu…
Browse files Browse the repository at this point in the history
…Maximum

Change Windows CPU Percent to Maximum
  • Loading branch information
dqminh authored May 8, 2017
2 parents 13895d6 + 7d007ca commit d42f1eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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

```json
"windows": {
"resources": {
"cpu": {
"percent": 50
"maximum": 5000
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions schema/config-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d42f1eb

Please sign in to comment.