Nomad
Nomad resource quota specification
Resource quotas let you limit resource consumption across teams or
projects to reduce waste and align budgets. Manage resource quotas with the CLI quota command or with Nomad's Quota HTTP API.
Enterprise
This feature requires Nomad Enterprise(opens in new tab).
Example resource quota specification
This example is a resource quota specification generated with the nomad quota init command.
name = "default-quota"
description = "Limit the shared default namespace"
# Create a limit for the global region. Additional limits may
# be specified in-order to limit other regions.
limit {
region = "global"
region_limit {
cores = 0
cpu = 2500
memory = 1000
memory_max = 1000
device "nvidia/gpu/1080ti" {
count = 1
}
storage {
variables = 1000 # in MB
host_volumes = "1000 GiB"
}
node_pool "example" {
cpu = 500
memory = 100
}
}
}
Parameters
name(string)- The name of the Quota. Nomad usesnameto connect the quota aNamespace.description(string: <optional>)- A human-readable description.limit(QuotaLimit)- The resource limit in a Nomad region.
limit parameters
region(string)- The Nomadregionthat the limit applies to.region_limit(RegionLimit)- Resources to limit.
region_limit parameters
Region limits define the limits on cumulative task resources blocks for
allocations in the namespace and region the quota is applied to.
cores(int: <optional>)- The limit on total number of CPU cores from allresources.coresin the namespace. The CPU concepts documentation has more details on CPU resources.cpu(int: <optional>)- The limit on total amount of CPU from allresources.cpuin the namespace.memory(int: <optional>)- The limit on total mount of memory in MB from allresources.memoryin the namespace.memory_max(int: <optional>)- The limit on total mount of hard memory limits in MB from allresources.memory_maxin the namespace.device(Device: nil)storage(Storage: nil)node_pool(Node Pool: nil)
device parameters
The device label specifies which device(s) the quota applies to,
equivalent to the device block in a job specification.
count(int)- How many of this device may be used.
storage parameters
The storage block defines limits on provisioned storage.
host_volumes(int: 0)- Maximum total size of all dynamic host volumes in MiB. The default0means unlimited, and-1means variables are fully disabled. This field accepts human-friendly string inputs such as "100 GiB". The quota for host volumes is enforced at the time the volume is created via [volume create][].variables(int: 0)- Maximum total size of all Nomad variables in MiB. The default0means unlimited, and-1means variables are fully disabled. This field accepts human-friendly string inputs such as "100 GiB".
node_pool parameters
The node_pool label specifies which node pools the quota applies to. Every
node_pool limit has to be lower than the region limit. Node pool limits
are a strict subset of the region limits. You may also specify separate limits
for the default node pool.
Resources
Visit the Create and use resource quotas tutorial to learn how to create quotas, attach a quota to a namespace, secure a quota with ACL, and design quotas for federated clusters.