Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Login as root:

sudo su

 

Create a swap file with 4 blocks of 1GB:

dd if=/dev/zero of=/mnt/swap bs=1G count=4

 

Enable the file for swap usage:

chmod 600 /mnt/swap
mkswap /mnt/swap
swapon /mnt/swap

 

Persist the swap file:

  • add to /etc/fstab (bottom):
/mnt/swap none swap sw 0 0
  • add to /etc/sysctl.conf (bottom):
vm.swappiness=30
  • No labels