piframe/docs/swap.md

389 B

swap

The below commands will setup 1Gb of swap space as a file on the root filesystem and activate it for use.


mkdir /swap
chattr +C /swap
fallocate -l 1024M /swap/swap.1
chmod 600 /swap/swap.1
mkswap /swap/swap.1
swapon /swap/swap.1
echo 'vm.swappiness=1' > /etc/sysctl.d/99-sysctl.conf
echo "/swap/swap.1 none swap defaults 0 0" >> /etc/fstab
swapon -a