Docker driver core reservation behaviour in 1.1

Hi all,

We’ve recently updated to Nomad 1.1 to take advantage of the core reservation feature but we’ve noticed what we think is unexpected behaviour in docker. For a docker driver job that specifies “cores: 2” how should that be reflected in CpuShares and CpusetCpus values for that container? We’re seeing the value of CpuShares increase and decrease by a factor of the jobs cores value while the CpusetCpu value stays at 0.

How does Nomad pin the jobs container to the reserved CPU resource? Are we looking in the wrong place?



Hi @evankiljoy and thanks for your question.

When using the Docker driver, Nomad moves the container to a Nomad managed cGroup which means the Docker API unfortunately does not reflect the true nature as you have discovered.

On the host where the container process is running you can identify particular cpuset details within the /proc/<pid>/ directory. Specifically the cpuset file and the Cpus_allowed_list parameter within the status file would be of interest.

jrasell and the Nomad team