summaryrefslogtreecommitdiff
path: root/contrib/init/systemd
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2016-07-12 22:54:56 +0200
committerSebastiaan van Stijn <github@gone.nl>2016-07-13 17:15:19 +0200
commit428d7337e808ec5f4dba1b0aceda002f295cc320 (patch)
treef326379ac7e6146cb1f69207f357df412a9d7cc5 /contrib/init/systemd
parent92b15778712ff2eb85bf5b7e00fb4fe4310fd6b1 (diff)
downloaddocker-428d7337e808ec5f4dba1b0aceda002f295cc320.tar.gz
Don't set ulimits (nproc)
There is a not-insignificant performance overhead for all containers (if containerd is a child of Docker, which is the current setup) if rlimits are set on the main Docker daemon process (because the limits propogate to all children). We recommend using cgroups to do container-local accounting. This applies the change added in 8db61095a3d0bcb0733580734ba5d54bc27a614d to other init scripts. Note that nfile cannot be set to unlimited, and the limit is hardcoded to 1048576 (2^20) , see: http://stackoverflow.com/a/1213069/1811501 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'contrib/init/systemd')
-rw-r--r--contrib/init/systemd/docker.service2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/init/systemd/docker.service b/contrib/init/systemd/docker.service
index c3f3472472..5024c96525 100644
--- a/contrib/init/systemd/docker.service
+++ b/contrib/init/systemd/docker.service
@@ -11,9 +11,9 @@ Type=notify
# for containers run by docker
ExecStart=/usr/bin/dockerd -H fd://
ExecReload=/bin/kill -s HUP $MAINPID
+LimitNOFILE=1048576
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
-LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.