Skip to content

Commit 1fef707

Browse files
committed
Update Windows CPU comments
Signed-off-by: Justin Terry <[email protected]>
1 parent 6969a0a commit 1fef707

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

config-windows.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@ The following parameters can be specified:
7777

7878
`cpu` is an OPTIONAL configuration for the container's CPU usage.
7979

80-
The following parameters can be specified:
80+
The following parameters can be specified (mutually exclusive):
81+
82+
* **`count`** *(uint64, OPTIONAL)* - specifies the number of CPUs available to the container. It represents the fraction of the configured processor `count` in a container in relation to the processors available in the host. The fraction ultimately determines the portion of processor cycles that the threads in a container can use during each scheduling interval, as the number of cycles per 10,000 cycles.
83+
* **`shares`** *(uint16, OPTIONAL)* - limits the share of processor time given to the container relative to other workloads on the processor. The processor `shares` (`weight` at the platform level) is a value between 0 and 10,000.
84+
* **`maximum`** *(uint16, OPTIONAL)* - determines the portion of processor cycles that the threads in a container can use during each scheduling interval, as the number of cycles per 10,000 cycles. Set processor `maximum` to a percentage times 100.
8185

82-
* **`count`** *(uint64, OPTIONAL)* - specifies the number of CPUs available to the container.
83-
* **`shares`** *(uint16, OPTIONAL)* - specifies the relative weight to other containers with CPU shares.
84-
* **`maximum`** *(uint16, OPTIONAL)* - specifies the portion of processor cycles that this container can use as a percentage times 100.
86+
Ref: https://docs.microsoft.com/en-us/virtualization/api/hcs/schemareference#Container_Processor
8587

8688
#### Example
8789

specs-go/config.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,21 @@ type WindowsMemoryResources struct {
524524

525525
// WindowsCPUResources contains CPU resource management settings.
526526
type WindowsCPUResources struct {
527-
// Number of CPUs available to the container.
527+
// Count is the number of CPUs available to the container. It represents the
528+
// fraction of the configured processor `count` in a container in relation
529+
// to the processors available in the host. The fraction ultimately
530+
// determines the portion of processor cycles that the threads in a
531+
// container can use during each scheduling interval, as the number of
532+
// cycles per 10,000 cycles.
528533
Count *uint64 `json:"count,omitempty"`
529-
// CPU shares (relative weight to other containers with cpu shares).
534+
// Shares limits the share of processor time given to the container relative
535+
// to other workloads on the processor. The processor `shares` (`weight` at
536+
// the platform level) is a value between 0 and 10000.
530537
Shares *uint16 `json:"shares,omitempty"`
531-
// Specifies the portion of processor cycles that this container can use as a percentage times 100.
538+
// Maximum determines the portion of processor cycles that the threads in a
539+
// container can use during each scheduling interval, as the number of
540+
// cycles per 10,000 cycles. Set processor `maximum` to a percentage times
541+
// 100.
532542
Maximum *uint16 `json:"maximum,omitempty"`
533543
}
534544

0 commit comments

Comments
 (0)