如何动态更新docker容器blkio配置?

如何动态更新docker容器blkio配置?,docker,cgroups,Docker,Cgroups,我可以使用-blkio weight-blkio weight device-device read bps-device read iops-device write bps-device write iops运行docker docker update命令可以动态更新容器配置 但是,我可以只更新-blkio-weight参数 为什么docker update不支持其他参数,如-blkio重量设备 有没有办法做到这一点,比如手动修改cgroups args 更新: 我试图手动编辑/sys/fs

我可以使用-blkio weight-blkio weight device-device read bps-device read iops-device write bps-device write iops运行docker

docker update命令可以动态更新容器配置

但是,我可以只更新-blkio-weight参数

为什么docker update不支持其他参数,如-blkio重量设备

有没有办法做到这一点,比如手动修改cgroups args

更新:
我试图手动编辑/sys/fs/cgroup/blkio/../blkio.throttle.write_bps_设备中的cgroup args,结果正常。blkio参数似乎可以动态修改。

因为这是docker update命令支持的唯一标志

--blkio-weight      Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
docker update命令动态更新容器配置。 您可以使用此命令防止容器消耗过多 来自Docker主机的资源。只需一个命令,就可以放置 对单个容器或多个容器的限制。指定多个 容器,提供以空格分隔的容器名称或ID列表

这些是受支持的标志

--blkio-weight      Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
--cpu-period        Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota     Limit CPU CFS (Completely Fair Scheduler) quota
--cpu-rt-period     API 1.25+
Limit the CPU real-time period in microseconds
--cpu-rt-runtime        API 1.25+
Limit the CPU real-time runtime in microseconds
--cpu-shares , -c       CPU shares (relative weight)
--cpus      API 1.29+
Number of CPUs
--cpuset-cpus       CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems       MEMs in which to allow execution (0-3, 0,1)
--kernel-memory     Kernel memory limit
--memory , -m       Memory limit
--memory-reservation        Memory soft limit
--memory-swap       Swap limit equal to memory plus swap: ‘-1’ to enable unlimited swap
--pids-limit        API 1.40+
Tune container pids limit (set -1 for unlimited)
--restart       Restart policy to apply when a container exits

我猜这不能在运行时更改,但只能在流程启动时设置。