3

We can assign cpu-quota and cpu-period using docker run command. How to achieve the same using docker service create command?.

In docker 1.12 swarm mode there is only "--limit-cpus" option.

Aditya C S
  • 653
  • 1
  • 8
  • 17
  • Got to know the answer. Please refer https://github.com/docker/docker/issues/29579. docker swarm does this under the hood. For ex: Assume you have 1 cpu on your VM and if we say `docker service create --limit-cpu 0.02 ubuntu`, it will assign 2% of cpu to the container. So, if you inspect the container. you can see that cpu-quota will be 2000 and cpu-perids will be 100000. – Aditya C S Dec 20 '16 at 14:35

0 Answers0