mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
busybox: setup 'swappiness' related to installed memory
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
dd2d2032db
commit
abc61c3112
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user