Skip to content

Commit b5677b8

Browse files
authored
Merge pull request #1144 from jterry75/main
Update Windows CPU comments
2 parents 2fde0ec + 1fef707 commit b5677b8

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
@@ -526,11 +526,21 @@ type WindowsMemoryResources struct {
526526

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

0 commit comments

Comments
 (0)