Last active
October 24, 2018 05:39
-
-
Save jagamts1/9247ad09270942bc18b39fedd2dce1ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TO create swap space | |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=2048 # count is swap space in mb 2048 mean 2GB ram | |
sudo /sbin/mkswap /var/swap.1 | |
sudo chmod 600 /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
To make them as permanent in serer or in system add into the /etc/fstab | |
/var/swap.1 swap swap defaults 0 0 | |
note: | |
if ram < 2GB ram: | |
swap_space = ram*2 | |
elif ram > 2GB ram: | |
swap_space = ram+2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment