mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +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
|
fi
|
||||||
|
|
||||||
progress "enable swapfile"
|
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
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user