Fix the effect of `--memory-swap` is unset.

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
This commit is contained in:
Jintao Zhang 2019-10-11 15:52:53 +08:00
parent 58fa9f607b
commit 6a8e5b3107
1 changed files with 2 additions and 2 deletions

View File

@ -111,9 +111,9 @@ Its setting can have complicated effects:
[Prevent a container from using swap](#prevent-a-container-from-using-swap).
- If `--memory-swap` is unset, and `--memory` is set, the container can use
twice as much swap as the `--memory` setting, if the host container has swap
as much swap as the `--memory` setting, if the host container has swap
memory configured. For instance, if `--memory="300m"` and `--memory-swap` is
not set, the container can use 300m of memory and 600m of swap.
not set, the container can use 600m in total of memory and swap.
- If `--memory-swap` is explicitly set to `-1`, the container is allowed to use
unlimited swap, up to the amount available on the host system.