From 29451cbc4a5f21f4901d48441bac64a9d94e1aa4 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 5 Jun 2015 14:47:36 +1000 Subject: [PATCH] Remove swapiness settings from sysctl.conf On some of our images swapiness (as set for reasons described in I09974be88cc590cf9ffbd16db58c19131c9532aa) is in /etc/sysctl.conf, so a "sysctl -p" call done later can overwrite the value we want set. Change-Id: Ic46c4b9b80335c4c4ad58f9593927743cc1f4fab --- functions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 6bcb1a53..9ae9a290 100644 --- a/functions.sh +++ b/functions.sh @@ -290,7 +290,9 @@ function fix_disk_layout { # kicking in on some processes despite swap being available; # particularly things like mysql which have very high ratio of # anonymous-memory to file-backed mappings. - # + + # make sure reload of sysctl doesn't reset this + sudo sed -i '/vm.swappiness/d' /etc/sysctl.conf # This sets swappiness low; we really don't want to be relying on # cloud I/O based swap during our runs sudo sysctl -w vm.swappiness=10