How to configure a job to use all cores available on a client

I’d like to configure a job to use all available cores on a client, as I know there’s only one job will run there.

You should add additional parametr in the nomad job spec such as cores.

  • cores (int: ) - Specifies the number of CPU cores to reserve specifically for the task. This may not be used with cpu. The behavior of setting cores is specific to each task driver (e.g. docker, exec).

Thanks for your reply, but that doesn’t help. The cores param requires a specific number of CPU, while I want Nomad to automatically use all the cores available.

You can set this parametr as a node attribute :slight_smile: ${attr.cpu.numcores}

Unfortunately, Resources.Job.TaskGroups.Tasks.Resources.Cores only takes an integer

Or there is another way to set ${attr.cpu.numcores} as Resources.Job.TaskGroups.Tasks.Resources.Cores?

I read about it but there’s no way to set an environment variable or interpolated variable for an integer param