You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config: Shift oomScoreAdj from linux.resources to process
The only discussion related to this is in [1,2], where the
relationship between oomScoreAdj and disableOOMKiller is raised. But
since 429f936 (Adding cgroups path to the Spec, 2015-09-02, #137)
resources has been tied to cgroups, and oomScoreAdj is not about
cgroups. For example, we currently have (in config-linux.md):
You can configure a container's cgroups via the resources field of
the Linux configuration.
I suggested we move the property from linux.resources.oomScoreAdj to
linux.oomScoreAdj so config authors and runtimes don't have to worry
about what cgroupsPath means if the only entry in resources is
oomScoreAdj. Michael responded with [4]:
If anything it should probably go on the process
So that's what this commit does.
I've gone with the four-space indents here to keep Pandoc happy (see
7795661 (runtime.md: Fix sub-bullet indentation, 2016-06-08, #495),
but have left the existing entries in this list unchanged to reduce
churn.
[1]: #236
[2]: #292
[3]: #137
[4]: #782 (comment)
Signed-off-by: W. Trevor King <[email protected]>
***`oomScoreAdj`***(int, OPTIONAL)* adjusts the oom-killer score in `[pid]/oom_score_adj` for the container process's `[pid]` in a [proc pseudo-filesystem][procfs].
269
-
If `oomScoreAdj` is set, the runtime MUST set `oom_score_adj` to the given value.
270
-
If `oomScoreAdj` is not set, the runtime MUST NOT change the value of `oom_score_adj`.
271
-
272
-
This is a kernel/system level setting, where as `disableOOMKiller` is scoped for a memory cgroup.
273
-
For more information on how these two settings work together, see [the memory cgroup documentation section 10. OOM Contol][cgroup-v1-memory].
274
-
275
-
###### Example
276
-
277
-
```json
278
-
"oomScoreAdj": 100
279
-
```
280
-
281
266
#### <aname="configLinuxMemory" />Memory
282
267
283
268
**`memory`** (object, OPTIONAL) represents the cgroup subsystem `memory` and it's used to set limits on the container's memory usage.
Copy file name to clipboardExpand all lines: config.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,12 @@ For Linux-based systems the process structure supports the following process spe
154
154
155
155
***`apparmorProfile`** (string, OPTIONAL) specifies the name of the AppArmor profile to be applied to processes in the container.
156
156
For more information about AppArmor, see [AppArmor documentation][apparmor].
157
+
***`oomScoreAdj`***(int, OPTIONAL)* adjusts the oom-killer score in `[pid]/oom_score_adj` for the container process's `[pid]` in a [proc pseudo-filesystem][procfs].
158
+
If `oomScoreAdj` is set, the runtime MUST set `oom_score_adj` to the given value.
159
+
If `oomScoreAdj` is not set, the runtime MUST NOT change the value of `oom_score_adj`.
160
+
161
+
This is a per-process setting, where as [`disableOOMKiller`](config-linux.md#disable-out-of-memory-killer) is scoped for a memory cgroup.
162
+
For more information on how these two settings work together, see [the memory cgroup documentation section 10. OOM Contol][cgroup-v1-memory_2].
157
163
***`selinuxLabel`** (string, OPTIONAL) specifies the SELinux label to be applied to the processes in the container.
158
164
For more information about SELinux, see [SELinux documentation][selinux].
159
165
@@ -503,6 +509,7 @@ Here is a full example `config.json` for reference.
0 commit comments