Skip to content

Resource limits: CPU, memory, swap and processes

Select an icon to see what it is.

Step 2 of 6

--cpus is a quota, --cpu-shares is a weight

--cpus 0.5 becomes cpu.max: the container may use 50 ms of CPU in every 100 ms period. --cpu-shares becomes cpu.weight, a number that only compares this container with others. Older runc versions convert a weight of 512 to 20, and newer ones use another formula.

/sys/fs/cgroup/system.slice/docker-a3b4c5d6e7f80910a3b4c5d6e7f80910a3b4c5d6e7f80910a3b4c5d6e7f80910.scope (systemd cgroup driver)

cpu.max 50000 100000 (hard quota)
cpu.weight <converted from 512; the value depends on the runtime version>