mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Initialize swappiness in libcontainer cgroups template
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)
This commit is contained in:
parent
8ea1b54065
commit
9e9d227677
1 changed files with 3 additions and 2 deletions
|
@ -36,8 +36,9 @@ func New() *configs.Config {
|
|||
{Type: "NEWNET"},
|
||||
}),
|
||||
Cgroups: &configs.Cgroup{
|
||||
Parent: "docker",
|
||||
AllowAllDevices: false,
|
||||
Parent: "docker",
|
||||
AllowAllDevices: false,
|
||||
MemorySwappiness: -1,
|
||||
},
|
||||
Mounts: []*configs.Mount{
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue