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: Aleksa Sarai <asarai@suse.de>
| ... | ... |
@@ -11,8 +11,10 @@ Type=notify |
| 11 | 11 |
# for containers run by docker |
| 12 | 12 |
ExecStart=/usr/bin/dockerd -H fd:// |
| 13 | 13 |
ExecReload=/bin/kill -s HUP $MAINPID |
| 14 |
-LimitNOFILE=1048576 |
|
| 15 |
-LimitNPROC=1048576 |
|
| 14 |
+# Having non-zero Limit*s causes performance problems due to accounting overhead |
|
| 15 |
+# in the kernel. We recommend using cgroups to do container-local accounting. |
|
| 16 |
+LimitNOFILE=infinity |
|
| 17 |
+LimitNPROC=infinity |
|
| 16 | 18 |
LimitCORE=infinity |
| 17 | 19 |
# Uncomment TasksMax if your systemd version supports it. |
| 18 | 20 |
# Only systemd 226 and above support this version. |