From 8e8fc2c7b2cc5a59a7aa2a077eab7188c1646c20 Mon Sep 17 00:00:00 2001 From: Rafid Bin Mostofa Date: Sat, 4 Feb 2023 13:17:17 +0600 Subject: [PATCH] fix(engine): Minimum --kernel-memory is 6m ``linuxMinMemory`` was updated from 4m to 6m [0], and it is used to compare ``resources.KernelMemory`` [1, 2]. Thus, the actual minimum allowed value for --kernel-memory is 6m. Refs: - [0] https://github.com/docker/engine/commit/d2e23405bed2f5388b4a6c4f50c94ed2ab580319 - [1] https://github.com/docker/engine/blob/master/daemon/daemon_unix.go#L473 - [2] https://github.com/moby/moby/blob/master/daemon/daemon_unix.go#L452 --- config/containers/resource_constraints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/containers/resource_constraints.md b/config/containers/resource_constraints.md index d813a8322f..5623e30442 100644 --- a/config/containers/resource_constraints.md +++ b/config/containers/resource_constraints.md @@ -82,7 +82,7 @@ Most of these options take a positive integer, followed by a suffix of `b`, `k`, | `--memory-swap`* | The amount of memory this container is allowed to swap to disk. See [`--memory-swap` details](#--memory-swap-details). | | `--memory-swappiness` | By default, the host kernel can swap out a percentage of anonymous pages used by a container. You can set `--memory-swappiness` to a value between 0 and 100, to tune this percentage. See [`--memory-swappiness` details](#--memory-swappiness-details). | | `--memory-reservation` | Allows you to specify a soft limit smaller than `--memory` which is activated when Docker detects contention or low memory on the host machine. If you use `--memory-reservation`, it must be set lower than `--memory` for it to take precedence. Because it is a soft limit, it does not guarantee that the container doesn't exceed the limit. | -| `--kernel-memory` | The maximum amount of kernel memory the container can use. The minimum allowed value is `4m`. Because kernel memory cannot be swapped out, a container which is starved of kernel memory may block host machine resources, which can have side effects on the host machine and on other containers. See [`--kernel-memory` details](#--kernel-memory-details). | +| `--kernel-memory` | The maximum amount of kernel memory the container can use. The minimum allowed value is `6m`. Because kernel memory cannot be swapped out, a container which is starved of kernel memory may block host machine resources, which can have side effects on the host machine and on other containers. See [`--kernel-memory` details](#--kernel-memory-details). | | `--oom-kill-disable` | By default, if an out-of-memory (OOM) error occurs, the kernel kills processes in a container. To change this behavior, use the `--oom-kill-disable` option. Only disable the OOM killer on containers where you have also set the `-m/--memory` option. If the `-m` flag is not set, the host can run out of memory and the kernel may need to kill the host system's processes to free memory. | For more information about cgroups and memory in general, see the documentation