Docker Community Forums

Share and learn in the Docker community.

Limit CPUs (cpuset not just shares)

(Will Stern) #1

Is there currently a way to limit cpuset available to a Docker Cloud service not just cpushares?
I have services that automatically employ all CPU’s available.

I’m running 20 core machines, and, correct me if I’m wrong, but I believe it would be better to have 4 instances that each get a cpuset of 5 cores rather than 4 instances that each run on all 20 cores with cpushares rationing off processor %.

  • Maybe performance would balance out either way…haven’t tested my theories.
  • I could always limit this in the application, but prefer configuration over code.