Add Swap on CentOS 7
Create Swap
1. Check the System for Swap Information
2. Create a Swap File 4GB with blocksize 1mb
Change 4096 to size what you want
Contents
3. Check Created Swapfile
4. Enable a Swap File
5. Check Modified Permission of Swapfile
6. To secure, set up the swap space for use
7. Verify that the procedure was successful
After you successfully add swap on CentOS 7, continue steps below
8. Make the Swap File Permanent
insert in the last line
Tweak Your Swap Settings (Optional)
Set Swappiness