mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 07:26:28 +00:00
OS: change zram swap to 25% of available memory (#348)
This commit is contained in:
parent
662eda3c3b
commit
7b4be3b4f7
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user