Skip to content

Commit f412443

Browse files
committed
Merge pull request #222 from vishh/oom-score
Add oom_score_adj to the runtime Spec.
2 parents e71b6dd + 3829131 commit f412443

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

runtime-config-linux.md

+8
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ For example, to run a new process in an existing container without updating limi
158158
"disableOOMKiller": false
159159
```
160160

161+
#### Set oom_score_adj
162+
163+
More information on `oom_score_adj` available [here](https://www.kernel.org/doc/Documentation/filesystems/proc.txt).
164+
165+
```json
166+
"oomScoreAdj": 0
167+
```
168+
161169
#### Memory
162170

163171
```json

runtime_config_linux.go

+2
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ type Network struct {
198198
type Resources struct {
199199
// DisableOOMKiller disables the OOM killer for out of memory conditions
200200
DisableOOMKiller bool `json:"disableOOMKiller"`
201+
// Specify an oom_score_adj for the container. Optional.
202+
OOMScoreAdj int `json:"oomScoreAdj"`
201203
// Memory restriction configuration
202204
Memory Memory `json:"memory"`
203205
// CPU resource restriction configuration

0 commit comments

Comments
 (0)