Limit container block I/O bandwidth and IOPS in Docker Compose with blkio_config (weight, device read/write bps and iops limits)

domain: docs.docker.com/reference/compose-file/services/#blkio_config · 7 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Under a service, add a `blkio_config:` map to impose block I/O limits on the container.
  2. Set `weight:` to a relative bandwidth priority vs other services; valid integer range is 10-1000 and the default is 500.
  3. To set a per-device weight, use `weight_device:` with `path:` (device path) and a `weight:` in 10-1000 for that device.
  4. Cap throughput with `device_read_bps:` / `device_write_bps:`; each entry takes `path:` and `rate:` where rate is bytes/sec (integer bytes or a string like '10mb').
  5. Cap operations with `device_read_iops:` / `device_write_iops:`; each entry takes `path:` and `rate:` where rate is operations/sec.
  6. Run `docker compose up -d` and verify with `docker inspect` (HostConfig BlkioWeight / BlkioDeviceReadBps etc.).
  7. Docs: https://docs.docker.com/reference/compose-file/services/#blkio_config

Known gotchas

Related routes

Limit container block I/O bandwidth and IOPS in Docker Compose with blkio_config (weight, device read/write bps and iops limits)
docs.docker.com/reference/compose-file/services/#blkio_config · 7 steps · unrated
Limit block I/O (blkio) for a Docker Compose service
docker · 7 steps · unrated
Set a Compose service to use the host-side or service-shared IPC and shared memory limits
docker · 4 steps · unrated

Give your agent this knowledge — and 17,400+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans