Merge pull request #222 from vishh/oom-score
Add oom_score_adj to the runtime Spec.
This commit is contained in:
commit
f412443c41
|
@ -158,6 +158,14 @@ For example, to run a new process in an existing container without updating limi
|
||||||
"disableOOMKiller": false
|
"disableOOMKiller": false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Set oom_score_adj
|
||||||
|
|
||||||
|
More information on `oom_score_adj` available [here](https://www.kernel.org/doc/Documentation/filesystems/proc.txt).
|
||||||
|
|
||||||
|
```json
|
||||||
|
"oomScoreAdj": 0
|
||||||
|
```
|
||||||
|
|
||||||
#### Memory
|
#### Memory
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|
|
@ -198,6 +198,8 @@ type Network struct {
|
||||||
type Resources struct {
|
type Resources struct {
|
||||||
// DisableOOMKiller disables the OOM killer for out of memory conditions
|
// DisableOOMKiller disables the OOM killer for out of memory conditions
|
||||||
DisableOOMKiller bool `json:"disableOOMKiller"`
|
DisableOOMKiller bool `json:"disableOOMKiller"`
|
||||||
|
// Specify an oom_score_adj for the container. Optional.
|
||||||
|
OOMScoreAdj int `json:"oomScoreAdj"`
|
||||||
// Memory restriction configuration
|
// Memory restriction configuration
|
||||||
Memory Memory `json:"memory"`
|
Memory Memory `json:"memory"`
|
||||||
// CPU resource restriction configuration
|
// CPU resource restriction configuration
|
||||||
|
|
Loading…
Reference in New Issue