/cc @aluzzardi @sfsmithcha
@cmingxu Based on the calculation:
https://github.com/docker/docker/blob/v1.12.0-rc4/daemon/cluster/executor/container/container.go#L328-L332
resources.CPUQuota = r.Limits.NanoCPUs * resources.CPUPeriod / 1e9
, NanoCPUs
is defined as the CPU shares in units of 1/1e9
(or 10^-9
) of the CPU.
In other words, NanoCPUs
is the number of nano (1/1e9) CPUs
by a process.
This issue should be closed. This should be documented in https://docs.docker.com/engine/reference/commandline/service_create/#options (thus this issue is superseded by #30222)
Most helpful comment
@cmingxu Based on the calculation:
https://github.com/docker/docker/blob/v1.12.0-rc4/daemon/cluster/executor/container/container.go#L328-L332
,
NanoCPUs
is defined as the CPU shares in units of1/1e9
(or10^-9
) of the CPU.In other words,
NanoCPUs
is the number ofnano (1/1e9) CPUs
by a process.