Browse Source
Add LimitMEMLOCK parameter configuration in containerd.service (#9269)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
pull/9274/head
ERIK
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
3 deletions
-
roles/container-engine/containerd/defaults/main.yml
-
roles/container-engine/containerd/templates/containerd.service.j2
|
|
@ -46,3 +46,9 @@ containerd_registry_auth: [] |
|
|
|
# - registry: 10.0.0.2:5000 |
|
|
|
# username: user |
|
|
|
# password: pass |
|
|
|
|
|
|
|
# Configure containerd service |
|
|
|
containerd_limit_proc_num: "infinity" |
|
|
|
containerd_limit_core: "infinity" |
|
|
|
containerd_limit_open_file_num: "infinity" |
|
|
|
containerd_limit_mem_lock: "infinity" |
|
|
@ -28,9 +28,10 @@ Restart=always |
|
|
|
RestartSec=5 |
|
|
|
# Having non-zero Limit*s causes performance problems due to accounting overhead |
|
|
|
# in the kernel. We recommend using cgroups to do container-local accounting. |
|
|
|
LimitNPROC=infinity |
|
|
|
LimitCORE=infinity |
|
|
|
LimitNOFILE=infinity |
|
|
|
LimitNPROC={{ containerd_limit_proc_num }} |
|
|
|
LimitCORE={{ containerd_limit_core }} |
|
|
|
LimitNOFILE={{ containerd_limit_open_file_num }} |
|
|
|
LimitMEMLOCK={{ containerd_limit_mem_lock }} |
|
|
|
# Comment TasksMax if your systemd version does not supports it. |
|
|
|
# Only systemd 226 and above support this version. |
|
|
|
TasksMax=infinity |
|
|
|