Skip to content

Instantly share code, notes, and snippets.

@tomfanning
Created March 26, 2018 09:35
Show Gist options
  • Save tomfanning/28756860345027ee894f769f9f8f8e1c to your computer and use it in GitHub Desktop.
Save tomfanning/28756860345027ee894f769f9f8f8e1c to your computer and use it in GitHub Desktop.
Set up swap file
# set up a swapfile
dd if=/dev/zero of=/swap.file bs=1024 count=1048576
mkswap /swap.file
chmod 0600 /swap.file
swapon /swap.file
echo "
/swap.file none swap sw 0 0" >> /etc/fstab
echo "
vm.swappiness=10" >> /etc/sysctl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment