service create
command of docker 1.12 has two options to limit cpu and memory as follows:
--limit-cpu value Limit CPUs (default 0.000) --limit-memory value Limit Memory (default 0 B)
Do they limit resource per service or per container?
service create
command of docker 1.12 has two options to limit cpu and memory as follows:
--limit-cpu value Limit CPUs (default 0.000) --limit-memory value Limit Memory (default 0 B)
Do they limit resource per service or per container?
You can see in api/client/service/update.go
taskResources().Limits = &swarm.Resources{}
updateInt64Value(flagLimitCPU, &task.Resources.Limits.NanoCPUs)
--limit-cpu
was introduced in commit 12a00e6
Considering that swarmkit/manager/scheduler/nodeinfo.go has, when removing a task, the following code:
nodeInfo.AvailableResources.NanoCPUs += reservations.NanoCPUs
It appears limit-cpu is per node managed by a service.