busybox: setup 'swappiness' related to installed memory

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-10-15 05:50:36 +02:00
parent dd2d2032db
commit abc61c3112

View File

@ -40,5 +40,15 @@ if [ $INSTALLED_MEMORY -le 500000 ]; then
fi
progress "enable swapfile"
swapon $HOME/.cache/swapfile
swapon -p 10000 $HOME/.cache/swapfile
[ $INSTALLED_MEMORY -le 260000 ] \
&& sysctl -w vm.swappiness=100 \
|| sysctl -w vm.swappiness=60
else
sysctl -w vm.swappiness=0
fi