Swap
Swapiness
By default, Swapiness is set to 100. It means that swap will be used as much as ram. To avoid it we will set swapiness to 10.
# see swapiness value
sysctl wm.swapiness
# change swapiness value
sysctl -w wm.swapiness=10
To make change persistant, create the file /etc/sysctl.d/99-swapiness.conf
with
wm.swapiness=10
ZRAM
Armbian comes with a feature called ZRAM, which is basically a portion of RAM dedicated to holding temporary data in a compressed form. This is to prevent small but frequent writes (such as logs) from deteriorating an SD-card or eMMC module too quickly. In our configuration (the default one), /var/log
is mounted in this ZRAM partition and periodically (every few hours) writes the whole thing in the /var/log.hdd
folder. This is thus normal if the partition always seems full and it should cause issues.