Linux uses a swap file (more precisely, a partition) to write information from RAM to it when it is full. In most cases, the paging file is equal to the total amount of installed RAM.
Step 1. In the terminal from under the root, enter
swapon –s. Information about the swap partition will be displayed (see figure).
Step 2. Enter
free. Information on swap usage (used and free space; see figure) will be displayed.
Step 3. Compare the size of the swap partition used with its total size
If you are using a decent amount of swap space, do the following: either increase the swap partition, or install additional RAM in your computer.
You can view the swap space with the mount command (but it will not display the used swap space)
Large swap space is not a good solution. This means that programs will run on the hard drive (and not on the RAM), which will slow down the speed of the system. It is better to install additional RAM modules