Skip to content

Commit

Permalink
systemd: set Limit* to infinity
Browse files Browse the repository at this point in the history
There is a not-insignificant performance overhead for all containers (if
containerd is a child of Docker, which is the current setup) if systemd
sets rlimits on the main Docker daemon process (because the limits
propogate to all children).

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Aug 31, 2018
1 parent ef9ee10 commit 80039b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/init/systemd/docker.service
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Restart=always
# /opt/containerd/bin is in front so dockerd grabs the correct runc binary
Environment="PATH=/opt/containerd/bin:/sbin:/usr/bin:/usr/local/bin:$PATH"

# 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

[Install]
Expand Down

0 comments on commit 80039b4

Please sign in to comment.