Limit block I/O (blkio) for a Docker Compose service

domain: docker · 7 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Add a `blkio_config:` block to the service.
  2. Set relative bandwidth weight with `weight: 500` (allowed range 10-1000, default 500).
  3. Tune per-device weight with `weight_device: - path: /dev/sda weight: 500`.
  4. Cap bytes/sec with device_read_bps or device_write_bps, each an entry `path:` + `rate:` (integer bytes or a string like '12mb').
  5. Cap operations/sec with device_read_iops or device_write_iops, each an entry `path:` + integer `rate:`.
  6. Run `docker compose up -d` to apply.
  7. Official docs: https://docs.docker.com/reference/compose-file/services/#blkio_config

Known gotchas

Related routes

Set CPU, memory, and PID limits on a Docker Compose service (non-swarm) with cpus, mem_limit, and pids_limit
docs.docker.com/reference/compose-file/services/ · 5 steps · unrated
Set CPU, memory, and PID limits on a Docker Compose service (non-swarm) with cpus, mem_limit, and pids_limit
docs.docker.com/reference/compose-file/services/ · 5 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,300+ 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