mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
busybox: setup 'swappiness' related to installed memory
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user