From bd4c37762a9a382d800396a25ac9b152f5a443fa Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 12 May 2012 23:46:22 +0200 Subject: [PATCH] busybox: set minimum free memory for all platforms Signed-off-by: Stephan Raue --- packages/sysutils/busybox/init.d/07_sysctl | 11 +++++++++++ projects/RPi/filesystem/etc/sysctl.conf | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) delete mode 100644 projects/RPi/filesystem/etc/sysctl.conf diff --git a/packages/sysutils/busybox/init.d/07_sysctl b/packages/sysutils/busybox/init.d/07_sysctl index f18acd2460..fc34f29e80 100644 --- a/packages/sysutils/busybox/init.d/07_sysctl +++ b/packages/sysutils/busybox/init.d/07_sysctl @@ -23,6 +23,17 @@ # runlevels: openelec, installer, textmode progress "setup sysctl" + + ######################################################################## + ## set sysctl kernel params + ## proc/sys/vm/min_free_kbytes: + ## The free area is primarily useful to give the kernel enough memory + ## to act in situations where the swapper suddenly has to do a lot of work. + ## In other situations, you can make things worse, since you are + ## effectively giving less memory for applications. + ######################################################################## + echo 8192 > /proc/sys/vm/min_free_kbytes + if [ -f /etc/sysctl.conf ]; then sysctl -p /etc/sysctl.conf > /dev/null 2>&1 & fi diff --git a/projects/RPi/filesystem/etc/sysctl.conf b/projects/RPi/filesystem/etc/sysctl.conf deleted file mode 100644 index 9c551a0a0c..0000000000 --- a/projects/RPi/filesystem/etc/sysctl.conf +++ /dev/null @@ -1 +0,0 @@ -vm.min_free_kbytes = 8192 \ No newline at end of file