piframe/docs/swap.md

392 B

swap

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


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