Skip to content

Instantly share code, notes, and snippets.

@i40sys
Created March 29, 2022 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i40sys/72e593ce0c5d521be3d71b3c27899363 to your computer and use it in GitHub Desktop.
Save i40sys/72e593ce0c5d521be3d71b3c27899363 to your computer and use it in GitHub Desktop.
version: '2'
services:
SERVICE_NAME:
image: IMAGE_NAME
...
deploy:
resources:
limits:
cpus: 1
memory: 1G
reservations:
cpus: '0.25'
memory: 512M
blkio_config:
weight: 300
weight_device:
- path: /dev/sda
weight: 400
device_read_bps:
- path: /dev/sdb
rate: '12mb'
device_read_iops:
- path: /dev/sdb
rate: 120
device_write_bps:
- path: /dev/sdb
rate: '1024k'
device_write_iops:
- path: /dev/sdb
rate: 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment