From 0ce548c0f2520c90939ef721cc3f2c9686129c35 Mon Sep 17 00:00:00 2001 From: Ciprian Barbu Date: Fri, 3 Apr 2020 04:13:04 +0300 Subject: [PATCH] Ensure overcommit_memory=0 This could be set to 1 for aarch64, which introduces some issues when trying to allocate large amounts of memory. Setting it to 0 will prevent faulty processes from consuming all memory. Fixes https://jira.akraino.org/browse/IEC-26 Signed-off-by: Ciprian Barbu Change-Id: I332a91a669de2123d6e9e61fee0ad3627a003d83 --- src/foundation/scripts/k8s_common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/foundation/scripts/k8s_common.sh b/src/foundation/scripts/k8s_common.sh index 735c307..76092fd 100755 --- a/src/foundation/scripts/k8s_common.sh +++ b/src/foundation/scripts/k8s_common.sh @@ -101,4 +101,6 @@ sudo systemctl restart docker kubelet sudo modprobe br_netfilter _conf='/etc/sysctl.d/99-akraino-iec.conf' echo 'net.bridge.bridge-nf-call-iptables = 1' |& sudo tee "${_conf}" +# Set memory overcommit to 0 for extra checks during memory allocation +echo 'vm.overcommit_memory = 0' |& sudo tee -a "${_conf}" sudo sysctl -q -p "${_conf}" -- 2.16.6