Manages scheduler configuration of the Nomad cluster.
Set cluster scheduler configuration:
resource "nomad_scheduler_config" "config" {
scheduler_algorithm = "spread"
memory_oversubscription_enabled = true
preemption_config = {
system_scheduler_enabled = true
batch_scheduler_enabled = true
service_scheduler_enabled = true
sysbatch_scheduler_enabled = true
}
}
The following arguments are supported:
memory_oversubscription_enabled
(bool: false)
- When true
, tasks may exceed their reserved memory limit.scheduler_algorithm
(string: "binpack")
- Specifies whether scheduler binpacks or spreads allocations on available nodes. Possible values are binpack
and spread
.preemption_config
(map[string]bool)
- Options to enable preemption for various schedulers.
system_scheduler_enabled
(bool: true)
- Specifies whether preemption for system jobs is enabled. Note that if this is set to true, then system jobs can preempt any other jobs.batch_scheduler_enabled
(bool: false")
- Specifies whether preemption for batch jobs is enabled. Note that if this is set to true, then batch jobs can preempt any other jobs.service_scheduler_enabled
(bool: false)
- Specifies whether preemption for service jobs is enabled. Note that if this is set to true, then service jobs can preempt any other jobs.sysbatch_scheduler_enabled
(bool: false)
- Specifies whether preemption for sysbatch (system batch) jobs is enabled. Note that if this is set to true, then system batch jobs can preempt any other jobs.