Add OomScoreAdj to configure container oom killer preferences

libcontainer v0.0.4 introduces setting `/proc/self/oom_score_adj` to
better tune oom killing preferences for container process. This patch
simply integrates OomScoreAdj libcontainer's config option and adjust
the cli with this new option.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca
2015-10-13 11:26:27 +02:00
committed by Tibor Vass
parent 65120e8851
commit e9287cd43a
6 changed files with 12 additions and 0 deletions

View File

@ -58,6 +58,7 @@ Creates a new container.
--name="" Assign a name to the container
--net="default" Set the Network mode for the container
--oom-kill-disable=false Whether to disable OOM Killer for the container or not
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all=false Publish all exposed ports to random ports
-p, --publish=[] Publish a container's port(s) to the host
--pid="" PID namespace to use

View File

@ -62,6 +62,7 @@ parent = "smn_cli"
'host': use the host network stack inside the container
'NETWORK': connects the container to user-created network using `docker network create` command
--oom-kill-disable=false Whether to disable OOM Killer for the container or not
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all=false Publish all exposed ports to random ports
-p, --publish=[] Publish a container's port(s) to the host
--pid="" PID namespace to use