From 7e4cf8a7ecf15a3d389efdf7462c8480904b77c3 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Mon, 20 Jul 2015 16:10:10 +0800 Subject: [PATCH] Simplify swappiness check As suggested in https://github.com/docker/docker/pull/14004/files#r34022527 The concern there is we can't differentiate whether user explicitly asked for an invalid value of -1 or he did not specify anything. I don't think this would be a problem, because: - like all other default values like zero, we can't differentiate user specify it or not, most of which, zeros are also invalid, so default is default, we show these default values in help info, so users would know if they set value as default, it'll be like they set nothing. - we can't do this kind of string check in REST api request, so it'll make the behave different from docker command and RESTapi. Signed-off-by: Qiang Huang --- docs/reference/run.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/run.md b/docs/reference/run.md index dcc9e663a5..859f3f2966 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -617,7 +617,8 @@ and require killing system processes to free memory. By default, a container's kernel can swap out a percentage of anonymous pages. To set this percentage for a container, specify a `--memory-swappiness` value between 0 and 100. A value of 0 turns off anonymous page swapping. A value of -100 sets all anonymous pages as swappable. +100 sets all anonymous pages as swappable. By default, if you are not using +`--memory-swappiness`, memory swappiness value will be inherited from the parent. For example, you can set: