You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/manuals/engine/containers/resource_constraints.md
-29Lines changed: 0 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,6 @@ Most of these options take a positive integer, followed by a suffix of `b`, `k`,
86
86
|`--memory-swap`\*| The amount of memory this container is allowed to swap to disk. See [`--memory-swap` details](#--memory-swap-details). |
87
87
|`--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). |
88
88
|`--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). |
90
89
|`--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. |
91
90
92
91
For more information about cgroups and memory in general, see the documentation
@@ -139,34 +138,6 @@ of physical memory that can be used.
139
138
- By default, if you don't set `--memory-swappiness`, the value is
140
139
inherited from the host machine.
141
140
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 "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
-
170
141
## CPU
171
142
172
143
By default, each container's access to the host machine's CPU cycles is unlimited.
0 commit comments