What is The Linux Swap Partition?

By | May 3, 2018

During the installation of many modern Linux distributions, the hard drive (HDD) is automatically partitioned with the necessary file system (which include the Swap partition) to make the installation process simple as possible. After installation you can check your swap partition by entering the ‘free’ command in the terminal:


Linux free memory command

IMAGE: Linux free command – FossNaija.com


But there are some situations that necessitate you manually create a swap partition during installation.


Then what is the Swap partition?


The swap partition (or memory) is like a backup memory that is used by your computer’s RAM (read access memory) when it runs out of RAM space. A Linux PC without swap will freeze or refuse to launch new applications/processes unless a reboot of the system is carried out.


The swap partition can also help in moving some items (that are rarely used) from the RAM to the HDD in order to create enough room in the RAM for more important processes/applications. It is usually recommended that the size of the swap memory be equal or twice the size of the RAM when you have to manually create partitions on your HDD.


But computers have developed so much and become faster with enough memory (RAM) to run very complex processes/applications. And as a result the swap is mainly used to store running applications states when the PC goes into hibernation. And later used for a quick reboot of the system to exactly the state it was in prior.


Thought the swap memory can be helpful when it comes to memory related performance problems, it is best to just increase (upgrade) the RAM to a higher memory. Instead of increasing the swap memory.


Another smart thing to do would be to manage memory leakages using system monitoring tools to ease the memory strain on the RAM.


Happy Linux’NG!


I agree to have my personal information transfered to MailChimp ( more information )

Join over 10,000 visitors to receive Open Source tips, trick, news, tutorials, programming and more.

We hate spam. Your email address will not be sold or shared with anyone else.

MUST READ  Everybody does not have to be a programmer to use open source software, but...

Tell us what you think

This site uses Akismet to reduce spam. Learn how your comment data is processed.