mirror of https://github.com/docker/cli.git
add support for cpuset.mems
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
2040dff996
commit
84861b2109
|
@ -892,6 +892,7 @@ Creates a new container.
|
|||
--cgroup-parent="" Optional parent cgroup for the container
|
||||
--cidfile="" Write the container ID to the file
|
||||
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
||||
--device=[] Add a host device to the container
|
||||
--dns=[] Set custom DNS servers
|
||||
--dns-search=[] Set custom DNS search domains
|
||||
|
@ -1844,6 +1845,7 @@ To remove an image using its digest:
|
|||
--cap-drop=[] Drop Linux capabilities
|
||||
--cidfile="" Write the container ID to the file
|
||||
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
||||
-d, --detach=false Run container in background and print container ID
|
||||
--device=[] Add a host device to the container
|
||||
--dns=[] Set custom DNS servers
|
||||
|
|
|
@ -474,6 +474,7 @@ container:
|
|||
-memory-swap="": Total memory limit (memory + swap, format: <number><optional unit>, where unit = b, k, m or g)
|
||||
-c, --cpu-shares=0: CPU shares (relative weight)
|
||||
--cpuset-cpus="": CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems="": Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
|
||||
### Memory constraints
|
||||
|
||||
|
@ -599,6 +600,21 @@ This means processes in container can be executed on cpu 1 and cpu 3.
|
|||
|
||||
This means processes in container can be executed on cpu 0, cpu 1 and cpu 2.
|
||||
|
||||
We can set mems in which to allow execution for containers. Only effective
|
||||
on NUMA systems.
|
||||
|
||||
Examples:
|
||||
|
||||
$ docker run -ti --cpuset-mems="1,3" ubuntu:14.04 /bin/bash
|
||||
|
||||
This example restricts the processes in the container to only use memory from
|
||||
memory nodes 1 and 3.
|
||||
|
||||
$ docker run -ti --cpuset-mems="0-2" ubuntu:14.04 /bin/bash
|
||||
|
||||
This example restricts the processes in the container to only use memory from
|
||||
memory nodes 0, 1 and 2.
|
||||
|
||||
## Runtime privilege, Linux capabilities, and LXC configuration
|
||||
|
||||
--cap-add: Add Linux capabilities
|
||||
|
|
Loading…
Reference in New Issue