Document CFS CPU period / quota support in the API.
Docker 1.7 got support for specifying the CFS scheduler's CPU quota and period. The work appears to have started around commit dcc50e1d593fd7995189872791c6d7a013f16970. This change updates the API documentation to reflect the existing support. Signed-off-by: Victor Costan <costan@gmail.com> Upstream-commit: 26bd356078a02313649c7562369a2b2de6b63e19 Component: engine
This commit is contained in:
@ -135,6 +135,8 @@ of a 404.
|
||||
`SwapLimit` are now returned as boolean instead of as an int. In addition, the
|
||||
end point now returns the new boolean fields `CpuCfsPeriod`, `CpuCfsQuota`, and
|
||||
`OomKillDisable`.
|
||||
* The `hostConfig` option now accepts the fields `CpuPeriod` and `CpuQuota`
|
||||
* `POST /build` accepts `cpuperiod` and `cpuquota` options
|
||||
|
||||
### v1.18 API changes
|
||||
|
||||
|
||||
@ -168,6 +168,7 @@ Create a container
|
||||
"MemorySwap": 0,
|
||||
"CpuShares": 512,
|
||||
"CpuPeriod": 100000,
|
||||
"CpuQuota": 50000,
|
||||
"CpusetCpus": "0,1",
|
||||
"CpusetMems": "0,1",
|
||||
"BlkioWeight": 300,
|
||||
@ -215,6 +216,7 @@ Json Parameters:
|
||||
- **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.
|
||||
- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period.
|
||||
- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead.
|
||||
- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use.
|
||||
- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
@ -1218,6 +1220,8 @@ Query Parameters:
|
||||
- **memswap** - Total memory (memory + swap), `-1` to disable swap.
|
||||
- **cpushares** - CPU shares (relative weight).
|
||||
- **cpusetcpus** - CPUs in which to allow execution (e.g., `0-3`, `0,1`).
|
||||
- **cpuperiod** - The length of a CPU period in microseconds.
|
||||
- **cpuquota** - Microseconds of CPU time that the container can get in a CPU period.
|
||||
|
||||
Request Headers:
|
||||
|
||||
|
||||
@ -173,6 +173,7 @@ Create a container
|
||||
"MemorySwap": 0,
|
||||
"CpuShares": 512,
|
||||
"CpuPeriod": 100000,
|
||||
"CpuQuota": 50000,
|
||||
"CpusetCpus": "0,1",
|
||||
"CpusetMems": "0,1",
|
||||
"BlkioWeight": 300,
|
||||
@ -221,6 +222,7 @@ Json Parameters:
|
||||
- **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.
|
||||
- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period.
|
||||
- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead.
|
||||
- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use.
|
||||
- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
@ -1341,6 +1343,8 @@ Query Parameters:
|
||||
- **memswap** - Total memory (memory + swap), `-1` to disable swap.
|
||||
- **cpushares** - CPU shares (relative weight).
|
||||
- **cpusetcpus** - CPUs in which to allow execution (e.g., `0-3`, `0,1`).
|
||||
- **cpuperiod** - The length of a CPU period in microseconds.
|
||||
- **cpuquota** - Microseconds of CPU time that the container can get in a CPU period.
|
||||
|
||||
Request Headers:
|
||||
|
||||
|
||||
@ -180,6 +180,7 @@ Create a container
|
||||
"KernelMemory": 0,
|
||||
"CpuShares": 512,
|
||||
"CpuPeriod": 100000,
|
||||
"CpuQuota": 50000,
|
||||
"CpusetCpus": "0,1",
|
||||
"CpusetMems": "0,1",
|
||||
"BlkioWeight": 300,
|
||||
@ -232,6 +233,7 @@ Json Parameters:
|
||||
- **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.
|
||||
- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period.
|
||||
- **Cpuset** - Deprecated please don't use. Use `CpusetCpus` instead.
|
||||
- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use.
|
||||
- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
@ -1378,6 +1380,8 @@ Query Parameters:
|
||||
- **memswap** - Total memory (memory + swap), `-1` to disable swap.
|
||||
- **cpushares** - CPU shares (relative weight).
|
||||
- **cpusetcpus** - CPUs in which to allow execution (e.g., `0-3`, `0,1`).
|
||||
- **cpuperiod** - The length of a CPU period in microseconds.
|
||||
- **cpuquota** - Microseconds of CPU time that the container can get in a CPU period.
|
||||
- **buildargs** – JSON map of string pairs for build-time variables. Users pass
|
||||
these values at build-time. Docker uses the `buildargs` as the environment
|
||||
context for command(s) run via the Dockerfile's `RUN` instruction or for
|
||||
|
||||
Reference in New Issue
Block a user