Swap partition
The swap partition frees up some of the space in the hard disk space when the system's physical memory is not available for use by the currently running program. The freed space may come from programs that have not been manipulated for a long time, and the freed space is temporarily saved to the swap partition until those programs are run and the saved data is restored to memory from the swap partition.
Simply put: The swap partition is a buffer in memory
In the work, sometimes encounter the swap partition alarm, indicating that swap is not enough, this situation occurs:
First take a look at your memory is not enough, in many cases because the program consumes too much memory, or memory exposure caused by the need to restart the application, with the command top to view, and then press the M key, will be used in memory from high to low sorting
Free-m See how big your swap partition is when the system is installed, if it is too small, resulting in a swap alarm, we need to add a swap partition, the steps to add a swap partition are:
Create Swapfile
DD If=/dev/zero Of=/export/tmp/newdisk bs=4k count=102400
DD This command if you specify the source, generally is/dev/zero of where you want to put, Bs*count is the total space
bs*count=400m The total application is 400m
When applying for space, be sure to note that the size of the bs*count must be smaller than the size of the disk, or there will be problems
Format to swap format Mkswap-f/export/tmp/newdisk enable the virtual disk
SWAPON/EXPORT/TMP/NEWDISKD. Stop the virtual disk Swapoff/export/tmp/newdisk
Add and Release swap partitions