Merge pull request #222 from vishh/oom-score

Add oom_score_adj to the runtime Spec.
This commit is contained in:
Vincent Batts 2015-10-26 19:44:11 -04:00
commit f412443c41
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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