mirror of https://github.com/docker/cli.git
Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
This commit is contained in:
parent
57a8c59820
commit
499d634f32
|
@ -1405,7 +1405,9 @@ _docker_run() {
|
||||||
--cpu-shares
|
--cpu-shares
|
||||||
--device
|
--device
|
||||||
--device-read-bps
|
--device-read-bps
|
||||||
|
--device-read-iops
|
||||||
--device-write-bps
|
--device-write-bps
|
||||||
|
--device-write-iops
|
||||||
--dns
|
--dns
|
||||||
--dns-opt
|
--dns-opt
|
||||||
--dns-search
|
--dns-search
|
||||||
|
|
|
@ -469,7 +469,9 @@ __docker_subcommand() {
|
||||||
"($help)--cidfile=[Write the container ID to the file]:CID file:_files"
|
"($help)--cidfile=[Write the container ID to the file]:CID file:_files"
|
||||||
"($help)*--device=[Add a host device to the container]:device:_files"
|
"($help)*--device=[Add a host device to the container]:device:_files"
|
||||||
"($help)*--device-read-bps=[Limit the read rate (bytes per second) from a device]:device:IO rate: "
|
"($help)*--device-read-bps=[Limit the read rate (bytes per second) from a device]:device:IO rate: "
|
||||||
|
"($help)*--device-read-iops=[Limit the read rate (IO per second) from a device]:device:IO rate: "
|
||||||
"($help)*--device-write-bps=[Limit the write rate (bytes per second) to a device]:device:IO rate: "
|
"($help)*--device-write-bps=[Limit the write rate (bytes per second) to a device]:device:IO rate: "
|
||||||
|
"($help)*--device-write-iops=[Limit the write rate (IO per second) to a device]:device:IO rate: "
|
||||||
"($help)*--dns=[Set custom DNS servers]:DNS server: "
|
"($help)*--dns=[Set custom DNS servers]:DNS server: "
|
||||||
"($help)*--dns-opt=[Set custom DNS options]:DNS option: "
|
"($help)*--dns-opt=[Set custom DNS options]:DNS option: "
|
||||||
"($help)*--dns-search=[Set custom DNS search domains]:DNS domains: "
|
"($help)*--dns-search=[Set custom DNS search domains]:DNS domains: "
|
||||||
|
|
|
@ -31,7 +31,9 @@ Creates a new container.
|
||||||
--cpuset-mems="" Memory nodes (MEMs) 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
|
--device=[] Add a host device to the container
|
||||||
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb)
|
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb)
|
||||||
|
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000)
|
||||||
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb)
|
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb)
|
||||||
|
--device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-iops=/dev/sda:1000)
|
||||||
--disable-content-trust=true Skip image verification
|
--disable-content-trust=true Skip image verification
|
||||||
--dns=[] Set custom DNS servers
|
--dns=[] Set custom DNS servers
|
||||||
--dns-opt=[] Set custom DNS options
|
--dns-opt=[] Set custom DNS options
|
||||||
|
|
|
@ -30,7 +30,9 @@ parent = "smn_cli"
|
||||||
-d, --detach=false Run container in background and print container ID
|
-d, --detach=false Run container in background and print container ID
|
||||||
--device=[] Add a host device to the container
|
--device=[] Add a host device to the container
|
||||||
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb)
|
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb)
|
||||||
|
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000)
|
||||||
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb)
|
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb)
|
||||||
|
--device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-bps=/dev/sda:1000)
|
||||||
--disable-content-trust=true Skip image verification
|
--disable-content-trust=true Skip image verification
|
||||||
--dns=[] Set custom DNS servers
|
--dns=[] Set custom DNS servers
|
||||||
--dns-opt=[] Set custom DNS options
|
--dns-opt=[] Set custom DNS options
|
||||||
|
|
|
@ -633,6 +633,8 @@ container:
|
||||||
| `--blkio-weight-device=""` | Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`) |
|
| `--blkio-weight-device=""` | Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`) |
|
||||||
| `--device-read-bps=""` | Limit read rate from a device (format: `<device-path>:<number>[<unit>]`). Number is a positive integer. Unit can be one of `kb`, `mb`, or `gb`. |
|
| `--device-read-bps=""` | Limit read rate from a device (format: `<device-path>:<number>[<unit>]`). Number is a positive integer. Unit can be one of `kb`, `mb`, or `gb`. |
|
||||||
| `--device-write-bps=""` | Limit write rate to a device (format: `<device-path>:<number>[<unit>]`). Number is a positive integer. Unit can be one of `kb`, `mb`, or `gb`. |
|
| `--device-write-bps=""` | Limit write rate to a device (format: `<device-path>:<number>[<unit>]`). Number is a positive integer. Unit can be one of `kb`, `mb`, or `gb`. |
|
||||||
|
| `--device-read-iops="" ` | Limit read rate (IO per second) from a device (format: `<device-path>:<number>`). Number is a positive integer. |
|
||||||
|
| `--device-write-iops="" ` | Limit write rate (IO per second) to a device (format: `<device-path>:<number>`). Number is a positive integer. |
|
||||||
| `--oom-kill-disable=false` | Whether to disable OOM Killer for the container or not. |
|
| `--oom-kill-disable=false` | Whether to disable OOM Killer for the container or not. |
|
||||||
| `--memory-swappiness=""` | Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| `--memory-swappiness=""` | Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
||||||
| `--shm-size=""` | Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. |
|
| `--shm-size=""` | Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. |
|
||||||
|
@ -984,15 +986,15 @@ on `/dev/sda` setting that weight to `200`:
|
||||||
--blkio-weight-device "/dev/sda:200" \
|
--blkio-weight-device "/dev/sda:200" \
|
||||||
ubuntu
|
ubuntu
|
||||||
|
|
||||||
The `--device-read-bps` flag limits the read rate from a device. For example,
|
The `--device-read-bps` flag limits the read rate (bytes per second) from a device.
|
||||||
this command creates a container and limits the read rate to `1mb` per second
|
For example, this command creates a container and limits the read rate to `1mb`
|
||||||
from `/dev/sda`:
|
per second from `/dev/sda`:
|
||||||
|
|
||||||
$ docker run -it --device-read-bps /dev/sda:1mb ubuntu
|
$ docker run -it --device-read-bps /dev/sda:1mb ubuntu
|
||||||
|
|
||||||
The `--device-write-bps` flag limits the write rate to a device. For example,
|
The `--device-write-bps` flag limits the write rate (bytes per second)to a device.
|
||||||
this command creates a container and limits the write rate to `1mb` per second
|
For example, this command creates a container and limits the write rate to `1mb`
|
||||||
for `/dev/sda`:
|
per second for `/dev/sda`:
|
||||||
|
|
||||||
$ docker run -it --device-write-bps /dev/sda:1mb ubuntu
|
$ docker run -it --device-write-bps /dev/sda:1mb ubuntu
|
||||||
|
|
||||||
|
@ -1000,6 +1002,21 @@ Both flags take limits in the `<device-path>:<limit>[unit]` format. Both read
|
||||||
and write rates must be a positive integer. You can specify the rate in `kb`
|
and write rates must be a positive integer. You can specify the rate in `kb`
|
||||||
(kilobytes), `mb` (megabytes), or `gb` (gigabytes).
|
(kilobytes), `mb` (megabytes), or `gb` (gigabytes).
|
||||||
|
|
||||||
|
The `--device-read-iops` flag limits read rate (IO per second) from a device.
|
||||||
|
For example, this command creates a container and limits the read rate to
|
||||||
|
`1000` IO per second from `/dev/sda`:
|
||||||
|
|
||||||
|
$ docker run -ti --device-read-iops /dev/sda:1000 ubuntu
|
||||||
|
|
||||||
|
The `--device-write-iops` flag limits write rate (IO per second) to a device.
|
||||||
|
For example, this command creates a container and limits the write rate to
|
||||||
|
`1000` IO per second to `/dev/sda`:
|
||||||
|
|
||||||
|
$ docker run -ti --device-write-iops /dev/sda:1000 ubuntu
|
||||||
|
|
||||||
|
Both flags take limits in the `<device-path>:<limit>` format. Both read and
|
||||||
|
write rates must be a positive integer.
|
||||||
|
|
||||||
## Additional groups
|
## Additional groups
|
||||||
--group-add: Add Linux capabilities
|
--group-add: Add Linux capabilities
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,9 @@ docker-create - Create a new container
|
||||||
[**--cpuset-mems**[=*CPUSET-MEMS*]]
|
[**--cpuset-mems**[=*CPUSET-MEMS*]]
|
||||||
[**--device**[=*[]*]]
|
[**--device**[=*[]*]]
|
||||||
[**--device-read-bps**[=*[]*]]
|
[**--device-read-bps**[=*[]*]]
|
||||||
|
[**--device-read-iops**[=*[]*]]
|
||||||
[**--device-write-bps**[=*[]*]]
|
[**--device-write-bps**[=*[]*]]
|
||||||
|
[**--device-write-iops**[=*[]*]]
|
||||||
[**--dns**[=*[]*]]
|
[**--dns**[=*[]*]]
|
||||||
[**--dns-search**[=*[]*]]
|
[**--dns-search**[=*[]*]]
|
||||||
[**--dns-opt**[=*[]*]]
|
[**--dns-opt**[=*[]*]]
|
||||||
|
@ -130,9 +132,15 @@ two memory nodes.
|
||||||
**--device-read-bps**=[]
|
**--device-read-bps**=[]
|
||||||
Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)
|
Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)
|
||||||
|
|
||||||
|
**--device-read-iops**=[]
|
||||||
|
Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000)
|
||||||
|
|
||||||
**--device-write-bps**=[]
|
**--device-write-bps**=[]
|
||||||
Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb)
|
Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb)
|
||||||
|
|
||||||
|
**--device-write-iops**=[]
|
||||||
|
Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000)
|
||||||
|
|
||||||
**--dns**=[]
|
**--dns**=[]
|
||||||
Set custom DNS servers
|
Set custom DNS servers
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@ docker-run - Run a command in a new container
|
||||||
[**-d**|**--detach**[=*false*]]
|
[**-d**|**--detach**[=*false*]]
|
||||||
[**--device**[=*[]*]]
|
[**--device**[=*[]*]]
|
||||||
[**--device-read-bps**[=*[]*]]
|
[**--device-read-bps**[=*[]*]]
|
||||||
|
[**--device-read-iops**[=*[]*]]
|
||||||
[**--device-write-bps**[=*[]*]]
|
[**--device-write-bps**[=*[]*]]
|
||||||
|
[**--device-write-iops**[=*[]*]]
|
||||||
[**--dns**[=*[]*]]
|
[**--dns**[=*[]*]]
|
||||||
[**--dns-opt**[=*[]*]]
|
[**--dns-opt**[=*[]*]]
|
||||||
[**--dns-search**[=*[]*]]
|
[**--dns-search**[=*[]*]]
|
||||||
|
@ -197,9 +199,15 @@ stopping the process by pressing the keys CTRL-P CTRL-Q.
|
||||||
**--device-read-bps**=[]
|
**--device-read-bps**=[]
|
||||||
Limit read rate from a device (e.g. --device-read-bps=/dev/sda:1mb)
|
Limit read rate from a device (e.g. --device-read-bps=/dev/sda:1mb)
|
||||||
|
|
||||||
|
**--device-read-iops**=[]
|
||||||
|
Limit read rate from a device (e.g. --device-read-iops=/dev/sda:1000)
|
||||||
|
|
||||||
**--device-write-bps**=[]
|
**--device-write-bps**=[]
|
||||||
Limit write rate to a device (e.g. --device-write-bps=/dev/sda:1mb)
|
Limit write rate to a device (e.g. --device-write-bps=/dev/sda:1mb)
|
||||||
|
|
||||||
|
**--device-write-iops**=[]
|
||||||
|
Limit write rate a a device (e.g. --device-write-iops=/dev/sda:1000)
|
||||||
|
|
||||||
**--dns-search**=[]
|
**--dns-search**=[]
|
||||||
Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
|
Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue