Resource definitions for placement should be (optionally) different to policies for sharing/enforcement
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Nomad version
`Nomad v0.8.7 (21a2d93eecf018ad2209a5eab6aae6c359267933+CHANGES)`
### Operating system and Environment details
Gentoo Linux + Docker 18.09.2
### Issue
I would like task configuration (docker/fork/java) to optionally not require memory or cpu limits on the tasks run. ( I know it cannot actually be enforced on java/fork )
In my deployments, I use affinity to pin certain tasks to certain nodes, and these tasks must never be interrupted or throttled, as they're designed to busy-spin the CPU cores, while being cpu-pinned to a subset of CPUs.
While I could manually set the cpu shares to the same approx Mhz as the node, this still does not guarantee my workload may not be throttled, given other activity on other cpu cores on the system - I need the guarantee of no outside throttling.
I appreciate that setting these values helps dense bursty workloads operate more effectively, but they're counterproductive for these financial/scientific workloads types.
This is a workaround in advance of #2303 - allowing absolute CPU core assignments rather than shares would solve this problem. It's also related to #4899
### Reproduction steps
At the moment, setting
```
resources {
cpu = 0
memory = 0
}
```
Gives a syntax error
```
* minimum CPU value is 20; got 0
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the resources block validation that rejects cpu=0 and review the related issues #2303 and #4899 for the intended distinction between placement and enforcement. Done means task configurations can optionally omit or disable CPU and memory limits while preserving valid resource checks and documenting the resulting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100