OS: change zram swap to 25% of available memory (#348)

This commit is contained in:
Pascal Vizeli 2019-02-08 11:53:31 +01:00 committed by GitHub
parent 662eda3c3b
commit 7b4be3b4f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,9 +51,9 @@ else
exit 1 exit 1
fi fi
# Calc 20% of memory for ZRAM swap partition # Calc 25% of memory for ZRAM swap partition
if [ "$TYPE" = "swap" ] && [ "$SIZE" -eq "0" ]; then if [ "$TYPE" = "swap" ] && [ "$SIZE" -eq "0" ]; then
SIZE="$(awk '/MemTotal/{ print $2 * 0.20 }' /proc/meminfo)K" SIZE="$(awk '/MemTotal/{ print $2 * 0.25 }' /proc/meminfo)K"
fi fi
# Init device # Init device