mirror of
https://github.com/docker/cli.git
synced 2026-09-25 17:02:07 -04:00
Windows: Add cpu count option
Signed-off-by: Darren Stahl <darst@microsoft.com> Upstream-commit: 4e15420b9be50ddd7fa65e5c7f9b732777f9cc35 Component: engine
This commit is contained in:
@@ -166,6 +166,7 @@ This section lists each version from latest to oldest. Each listing includes a
|
||||
* `GET /nodes` and `GET /node/(id or name)` now return `Addr` as part of a node's `Status`, which is the address that that node connects to the manager from.
|
||||
* The `HostConfig` field now includes `NanoCPUs` that represents CPU quota in units of 10<sup>-9</sup> CPUs.
|
||||
* `GET /info` now returns more structured information about security options.
|
||||
* The `HostConfig` field now includes `CpuCount` that represents the number of CPUs available for execution by the container. Windows daemon only.
|
||||
|
||||
### v1.24 API changes
|
||||
|
||||
|
||||
@@ -303,6 +303,7 @@ Create a container
|
||||
"MemoryReservation": 0,
|
||||
"KernelMemory": 0,
|
||||
"NanoCPUs": 500000,
|
||||
"CpuCount": 4,
|
||||
"CpuPercent": 80,
|
||||
"CpuShares": 512,
|
||||
"CpuPeriod": 100000,
|
||||
@@ -427,7 +428,14 @@ Create a container
|
||||
- **MemoryReservation** - Memory soft limit in bytes.
|
||||
- **KernelMemory** - Kernel memory limit in bytes.
|
||||
- **NanoCPUs** - CPU quota in units of 10<sup>-9</sup> CPUs.
|
||||
- **CpuPercent** - An integer value containing the usable percentage of the available CPUs. (Windows daemon only)
|
||||
- **CpuCount** - An integer value containing the number of usable CPUs.
|
||||
Windows daemon only. On Windows Server containers,
|
||||
the processor resource controls are mutually exclusive, the order of precedence
|
||||
is CPUCount first, then CPUShares, and CPUPercent last.
|
||||
- **CpuPercent** - An integer value containing the usable percentage of
|
||||
the available CPUs. Windows daemon only. On Windows Server containers,
|
||||
the processor resource controls are mutually exclusive, the order of precedence
|
||||
is CPUCount first, then CPUShares, and CPUPercent last.
|
||||
- **CpuShares** - An integer value containing the container's CPU Shares
|
||||
(ie. the relative weight vs other containers).
|
||||
- **CpuPeriod** - The length of a CPU period in microseconds.
|
||||
@@ -623,6 +631,7 @@ Return low-level information on the container `id`
|
||||
"ContainerIDFile": "",
|
||||
"CpusetCpus": "",
|
||||
"CpusetMems": "",
|
||||
"CpuCount": 4,
|
||||
"CpuPercent": 80,
|
||||
"CpuShares": 0,
|
||||
"CpuPeriod": 100000,
|
||||
|
||||
@@ -31,6 +31,9 @@ Options:
|
||||
--cap-drop value Drop Linux capabilities (default [])
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--cidfile string Write the container ID to the file
|
||||
--cpu-count int The number of CPUs available for execution by the container.
|
||||
Windows daemon only. On Windows Server containers, this is
|
||||
approximated as a percentage of total CPU usage.
|
||||
--cpu-percent int CPU percent (Windows only)
|
||||
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
|
||||
@@ -29,7 +29,14 @@ Options:
|
||||
--cap-drop value Drop Linux capabilities (default [])
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--cidfile string Write the container ID to the file
|
||||
--cpu-percent int CPU percent (Windows only)
|
||||
--cpu-count int The number of CPUs available for execution by the container.
|
||||
Windows daemon only. On Windows Server containers, this is
|
||||
approximated as a percentage of total CPU usage.
|
||||
--cpu-percent int Limit percentage of CPU available for execution
|
||||
by the container. Windows daemon only.
|
||||
The processor resource controls are mutually
|
||||
exclusive, the order of precedence is CPUCount
|
||||
first, then CPUShares, and CPUPercent last.
|
||||
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
|
||||
Reference in New Issue
Block a user