Adding swap space in Redhat/Fedora Linux Manually using File and Partition
Linux divides the physical Memory RAM (random access memory) into chucks of memory called pages. Swapping and paging algorithms is the process where a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. Having sufficient swap space enables the system to keep some physical memory free at all times.
There are two important reasons of using the swap space i.e.
- When the system requires more memory than is physically available(RAM), the kernel swaps out less used pages and gives memory to the current application (process).
- A significant number of the pages may be used by an application during its startup phase only for initialization and then never used again. The system can swap out those pages and free the memory for other applications.
This swap space is allotted at the time of system installation and generally selected to be twice the system memory in case of Desktops PC and Half the size of system memory in case of Servers but you may vary it according to your requirement.

