docker-compose version 3 怎么限定 io 的使用

2018-11-06 11:37:43 +08:00
 helloworld12

使用 prometheus

感觉 整台机器的 IO 被打穿了。。。

怎么限制单个节点的 IO

网上的都是讲 CPU 和内存

version: '3'
services:
  redis:
    image: redis:alpine
    deploy:
	  resources:
        limits:
	      cpus: '0.50'
    	  memory: 50M
        reservations:
	      cpus: '0.25'
    	  memory: 20M
1593 次点击
所在节点    问与答
2 条回复
feverzsj
2018-11-06 11:56:07 +08:00
--blkio-weight Block IO (relative weight), between 10 and 1000
--blkio-weight-device=[] Block IO weight (relative device weight)
--device-read-bps=[] Limit read rate (bytes per second) from a device
--device-read-iops=[] Limit read rate (IO per second) from a device
--device-write-bps=[] Limit write rate (bytes per second) to a device
--device-write-iops=[] Limit write rate (IO per second) to a device
jewelz
2021-07-25 03:06:02 +08:00
blkio_config:
weight: 200
weight_device:
- path: /dev/vda
weight: 200
device_read_bps:
- path: /dev/vda
rate: '24mb'
device_read_iops:
- path: /dev/vda
rate: 2000
device_write_bps:
- path: /dev/vda
rate: '48mb'
device_write_iops:
- path: /dev/vda
rate: 75

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/504950

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX