In this way, the memory insufficient issue can be solved.
The swap partition refers to exchange.
Through this way, it frees up some memory to let other programs to run.

This is the effect of swap partition.
It is true for thevirtual memory(pagefile.sys) of Windows.
Swap is a virtual memory partition under Linux.
Therefore, if you pursue a faster speed, you’re able to rely on swap.
However, the best way is still to expand physical memory.
After all, swap partition is a temporary solution.
When the RAM is exhausted, swap acts as a respirator for your system.
In other words, a little swap is beneficial, but it will be useless if applied too much.
Linux Swap Types
Linux provides two types of swap.
Swap partition a standarddisk partitionthat is designed as swap partition bymkswapcommand just as its name implies.
Its a regular file created and pre-allocated to the specified size.
So, to know the suitable Linux swap size is necessary and important.
The following table will show you the recommended swap space according to the different amounts of RAM.
The numbers in the table is just for your reference.
If you want to improve the performance of your Linux, you are able to follow the above suggestion.
If you dont have enough memory, it’s possible for you to use swap partition as an alternative.