Skip to content

Instantly share code, notes, and snippets.

@mpujari
Last active April 12, 2023 03:20
Show Gist options
  • Save mpujari/f44c62e7dd0055e29a43844e35baafd7 to your computer and use it in GitHub Desktop.
Save mpujari/f44c62e7dd0055e29a43844e35baafd7 to your computer and use it in GitHub Desktop.
Increase Swap size
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=64
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Add below line in '/etc/fstab' file
/swapfile none swap sw 0 0
------------------------------------------------------------
Recommendations
RAM Size Swap Size (Without Hibernation) Swap size (With Hibernation)
16GB 4GB 20GB
24GB 5GB 29GB
32GB 6GB 38GB
64GB 8GB 72GB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment