What is The Linux Swap Partition?

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.

READ  System Monitoring and Management – Part 2: Central Processing Unit (CPU) Usage.

 

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!

Share!

ALEXANDER WAYNE OMOROKUNWA

ALEXANDER WAYNE OMOROKUNWA

Chief Editor/Founder at FossNaija
A Linux enthusiast with a focus on enriching the Nigeria Linux experience and keeping a keen eye on Ubuntu and other Foss related developments.
ALEXANDER WAYNE OMOROKUNWA

Latest posts by ALEXANDER WAYNE OMOROKUNWA (see all)

Tell us what you think

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