Skip to content

Commit ff9a740

Browse files
authored
Merge pull request #24708 from dvdksn/rm-kernel-memory
engine: delete --kernel-memory flag; removed in v23.0
2 parents 0b42160 + ac713bb commit ff9a740

2 files changed

Lines changed: 1 addition & 30 deletions

File tree

content/manuals/engine/containers/resource_constraints.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ Most of these options take a positive integer, followed by a suffix of `b`, `k`,
8686
| `--memory-swap`\* | The amount of memory this container is allowed to swap to disk. See [`--memory-swap` details](#--memory-swap-details). |
8787
| `--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). |
8888
| `--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 doesn't guarantee that the container doesn't exceed the limit. |
89-
| `--kernel-memory` | The maximum amount of kernel memory the container can use. The minimum allowed value is `6m`. Because kernel memory can't 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). |
9089
| `--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 isn't set, the host can run out of memory and the kernel may need to kill the host system's processes to free memory. |
9190

9291
For more information about cgroups and memory in general, see the documentation
@@ -139,34 +138,6 @@ of physical memory that can be used.
139138
- By default, if you don't set `--memory-swappiness`, the value is
140139
inherited from the host machine.
141140

142-
### `--kernel-memory` details
143-
144-
Kernel memory limits are expressed in terms of the overall memory allocated to
145-
a container. Consider the following scenarios:
146-
147-
- **Unlimited memory, unlimited kernel memory**: This is the default
148-
behavior.
149-
- **Unlimited memory, limited kernel memory**: This is appropriate when the
150-
amount of memory needed by all cgroups is greater than the amount of
151-
memory that actually exists on the host machine. You can configure the
152-
kernel memory to never go over what's available on the host machine,
153-
and containers which need more memory need to wait for it.
154-
- **Limited memory, unlimited kernel memory**: The overall memory is
155-
limited, but the kernel memory isn't.
156-
- **Limited memory, limited kernel memory**: Limiting both user and kernel
157-
memory can be useful for debugging memory-related problems. If a container
158-
is using an unexpected amount of either type of memory, it runs out
159-
of memory without affecting other containers or the host machine. Within
160-
this setting, if the kernel memory limit is lower than the user memory
161-
limit, running out of kernel memory causes the container to experience
162-
an OOM error. If the kernel memory limit is higher than the user memory
163-
limit, the kernel limit doesn't cause the container to experience an OOM.
164-
165-
When you enable kernel memory limits, the host machine tracks the "high water mark"
166-
statistics on a per-process basis, so you can track which processes (in this
167-
case, containers) are using excess memory. This can be seen per process by
168-
viewing `/proc/<PID>/status` on the host machine.
169-
170141
## CPU
171142

172143
By default, each container's access to the host machine's CPU cycles is unlimited.

content/manuals/engine/containers/runmetrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Note that the cgroup v2 mode behaves slightly different from the cgroup v1 mode:
114114

115115
- The default cgroup driver (`dockerd --exec-opt native.cgroupdriver`) is `systemd` on v2, `cgroupfs` on v1.
116116
- The default cgroup namespace mode (`docker run --cgroupns`) is `private` on v2, `host` on v1.
117-
- The `docker run` flags `--oom-kill-disable` and `--kernel-memory` are discarded on v2.
117+
- The `docker run` flag `--oom-kill-disable` is discarded on v2.
118118

119119
### Find the cgroup for a given container
120120

0 commit comments

Comments
 (0)