helloworld12
V2EX  ›  问与答

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

  •  
  •   helloworld12 · Nov 6, 2018 · 2434 views
    This topic created in 2774 days ago, the information mentioned may be changed or developed.

    使用 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
    
    2 replies    2021-07-25 03:06:02 +08:00
    feverzsj
        1
    feverzsj  
       Nov 6, 2018   ❤️ 1
    --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
        2
    jewelz  
       Jul 25, 2021
    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
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1102 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 18:37 · PVG 02:37 · LAX 11:37 · JFK 14:37
    ♥ Do have faith in what you're doing.