标签:sch this 使用 and 执行 ase 激活 mem swap
选项 | 说明 |
-m or --memory= |
容器能使用的最大的内存。
如果你设置了这个选项,最小允许使用的值为4M。
|
--memory-swap * |
容器允许swap的内存大小。
更多细节:
--memory-swap details. |
--memory-swappiness |
默认情况下,不需要设置。
主机内核可以让容器使用一定比例的匿名内存页。你可以通过这个参数来设置这个百分比。更多细节:
--memory-swappiness details. |
--memory-reservation |
允许你指定软限制,比--memory 参数值要小。这软限制在Docker检测到主机上的连接或内存较少时激活。 |
--kernel-memory |
容器可以使用的最大的内核内存。最小值是4M。 因为内核内存不能被交换出去,一个缺少内核内存的容器可能会阻碍主机的资源,这会对主机和其他容器产生负面影响。
更多细节:
--kernel-memory details. |
--oom-kill-disable |
默认情况下:out-of-memory(oom)内存溢出的错误出现,内核杀死容器中的进程。使用--oom-kill-disable 可以改变这种行为。 仅仅在已经设置了-m 的容器中关闭 OOM 杀死。 如果-m 标志没有设置,主机可能耗尽内存,内核可能需要杀死主机系统进程来释放内存。 |
Option | Description |
---|---|
--cpu-shares |
Set this flag to a value greater or less than the default of 1024 to increase or reduce the container’s weight, and give it access to a greater or lesser proportion of the host machine’s CPU cycles. This is only enforced when CPU cycles are constrained. When plenty of CPU cycles are available, all containers use as much CPU as they need. In that way, this is a soft limit. --cpu-shares does not prevent containers from being scheduled in swarm mode. It prioritizes container CPU resources for the available CPU cycles. It does not guarantee or reserve any specific CPU access. |
--cpu-period |
容器上一个逻辑CPU的调度周期. --cpu-periodmor默认值是100000(100ms) |
--cpu-quota |
在由--cpu-period设置的时间段内容器可以调度的最大时间量。 |
--cpuset-cpus |
使用这个选项指定CPU使用一个或者多个CPU核,并用逗号分隔。 |
$ docker run -ti --cpu-period=10000 --cpu-quota=50000 busybox
$ docker run -ti --cpu-period=100000 --cpu-quota=200000
$ docker run -ti --cpuset-cpus=4 busybox
Option | Description |
---|---|
blkio-weight |
By default, each container can use the same proportion of block IO bandwidth (blkio). The default weight is 500. To raise or lower the proportion of blkio used by a given container, set the --blkio-weight flag to a value between 10 and 1000. This setting affects all block IO devices equally. |
blkio-weight-device |
The same as --blkio-weight , but you can set a weight per device, using the syntax --blkio-weight-device="DEVICE_NAME:WEIGHT" The DEVICE_NAME:WEIGHT is a string containing a colon-separated device name and weight. |
--device-read-bps and--device-write-bps |
Limits the read or write rate to or from a device by size, using a suffix of kb , mb , or gb . |
--device-read-iops or--device-write-iops |
Limits the read or write rate to or from a device by IO operations per second. |
$ docker run -it --blkio-weight-device "/dev/sda:200" ubuntu
$ docker run -ti --device-read-iops /dev/sda:1000 ubuntu
标签:sch this 使用 and 执行 ase 激活 mem swap
原文地址:http://www.cnblogs.com/Aiapple/p/6991851.html