-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize swappiness in libcontainer cgroups template #14030
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By default, the cgroup setting in libcontainer's configs.Cgroup for memory swappiness will default to 0, which is a valid choice for memory swappiness, but that means by default every container's memory swappiness will be set to zero instead of the default 60, which is probably not what users are expecting. When the swappiness UI PR comes into Docker, there will be docker run controls to set this per container, but for now we want to make sure *not* to change the default, as well as work around an older kernel issue that refuses to allow it to be set when cgroup hiearchies are in use. Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Makes sense. It's always hard to do something good with default values :/ |
estesp
added a commit
to estesp/libcontainer
that referenced
this pull request
Jun 19, 2015
As related to #639, this at least makes the "nsinit" consumer of libcontainer initialize the value to "-1" and also allows the user to specify a setting for the container. This is an analog to Docker PR moby/moby#14030. Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
PR for swapiness UI is already up: #14004 |
@cpuguy83 ah, cool, didn't realize another one was opened now. This change is still required with our without a UI for setting it from the user. |
estesp
added a commit
to estesp/libcontainer
that referenced
this pull request
Jun 19, 2015
As related to #639, this at least makes the "nsinit" consumer of libcontainer initialize the value to "-1" and also allows the user to specify a setting for the container. This is an analog to Docker PR moby/moby#14030. Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
janky is being janky. LGTM |
LGTM |
LK4D4
added a commit
that referenced
this pull request
Jun 25, 2015
Initialize swappiness in libcontainer cgroups template
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default, the cgroup setting in libcontainer's
configs.Cgroup
formemory swappiness will default to 0, which is a valid choice for memory
swappiness, but that means by default every container's memory
swappiness will be set to zero instead of the default 60, which is
probably not what users are expecting.
When the swappiness UI PR comes into Docker, there will be docker run
controls to set this per container, but for now we want to make sure
not to change the default, as well as work around an older kernel
issue that refuses to allow it to be set when cgroup hiearchies are in
use.
See docker/libcontainer#639 for more information. Also see closed PR #13882 which can probably be reconsidered now that the libcontainer update PR has been merged.
Docker-DCO-1.1-Signed-off-by: Phil Estes estesp@linux.vnet.ibm.com (github: estesp)