Creating Swap
Use free-h to view the current memory usage, whether there are swap
free -h
Swap has a good distribution, you can not configure, of course, refer to the following configuration
1. Create a file swap partitions: increase the size of the swap partition 2G, count equal to the desired block size
dd if=/dev/zero of=/home/swap bs=1024 count=2048000
2. Set the swap file
mkswap /home/swap
3. Enable the swap file
swapon /home/swap
4. Check again to memory conditions free -h, the results have changed
free -h
So far, Swap created