mirror of https://github.com/docker/cli.git
Add --oom-score-adjust to daemon
This adds an `--oom-score-adjust` flag to the daemon so that the value provided can be set for the docker daemon's process. The default value for the flag is -500. This will allow the docker daemon to have a less chance of being killed before containers do. The default value for processes is 0 with a min/max of -1000/1000. -500 is a good middle ground because it is less than the default for most processes and still not -1000 which basically means never kill this process in an OOM condition on the host machine. The only processes on my machine that have a score less than -500 are dbus at -900 and sshd and xfce( my window manager ) at -1000. I don't think docker should be set lower, by default, than dbus or sshd so that is why I chose -500. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
2e844f5e8d
commit
e3f04f5d20
|
@ -54,9 +54,10 @@ weight = -1
|
||||||
--label=[] Set key=value labels to the daemon
|
--label=[] Set key=value labels to the daemon
|
||||||
--log-driver="json-file" Default driver for container logs
|
--log-driver="json-file" Default driver for container logs
|
||||||
--log-opt=[] Log driver specific options
|
--log-opt=[] Log driver specific options
|
||||||
--mtu=0 Set the containers network MTU
|
|
||||||
--max-concurrent-downloads=3 Set the max concurrent downloads for each pull
|
--max-concurrent-downloads=3 Set the max concurrent downloads for each pull
|
||||||
--max-concurrent-uploads=5 Set the max concurrent uploads for each push
|
--max-concurrent-uploads=5 Set the max concurrent uploads for each push
|
||||||
|
--mtu=0 Set the containers network MTU
|
||||||
|
--oom-score-adjust=-500 Set the oom_score_adj for the daemon
|
||||||
--disable-legacy-registry Do not contact legacy registries
|
--disable-legacy-registry Do not contact legacy registries
|
||||||
-p, --pidfile="/var/run/docker.pid" Path to use for daemon PID file
|
-p, --pidfile="/var/run/docker.pid" Path to use for daemon PID file
|
||||||
--raw-logs Full timestamps without ANSI coloring
|
--raw-logs Full timestamps without ANSI coloring
|
||||||
|
@ -1057,6 +1058,7 @@ This is a full example of the allowed configuration options on Linux:
|
||||||
"insecure-registries": [],
|
"insecure-registries": [],
|
||||||
"disable-legacy-registry": false,
|
"disable-legacy-registry": false,
|
||||||
"default-runtime": "runc",
|
"default-runtime": "runc",
|
||||||
|
"oom-score-adjust": -500,
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"runc": {
|
"runc": {
|
||||||
"path": "runc"
|
"path": "runc"
|
||||||
|
|
Loading…
Reference in New Issue