Browse Source

Merge pull request #14030 from estesp/init-memory-swappiness

Initialize swappiness in libcontainer cgroups template
Alexander Morozov 10 năm trước cách đây
mục cha
commit
c281549610

+ 3 - 2
daemon/execdriver/native/template/default_template.go

@@ -36,8 +36,9 @@ func New() *configs.Config {
 			{Type: "NEWNET"},
 			{Type: "NEWNET"},
 		}),
 		}),
 		Cgroups: &configs.Cgroup{
 		Cgroups: &configs.Cgroup{
-			Parent:          "docker",
-			AllowAllDevices: false,
+			Parent:           "docker",
+			AllowAllDevices:  false,
+			MemorySwappiness: -1,
 		},
 		},
 		Mounts: []*configs.Mount{
 		Mounts: []*configs.Mount{
 			{
 			{