Recommended swap size for Linux systems

Two importance of swapping memory is as, first like when system requres more memory than it is static available, the kernel swaps out less used pages and provides memory to the application and second is a number of pages used application in startup phase may only be used for intialziation and not used again. System swap out pages and free the memory for other resources.

So many people use old method that swap partition should be twice the size of system.On current era that is a lot of swap,most of the systems never swap.People don’t want his system to ever run out of memory ( RAM + SWAP) ,but they usually would rather have much enough RAM in the system so it doesn’t need to swap.

If we add large amount of RAM in a system, we don’t need to extend large amount of swap space.

Why we need swap partition file system ?

When physical memory ( RAM) is full , then system needs more resources memory . Swap will used when the amount of physical memory is full then inactive pages in memory are moved to the swap filesystem .

The amount of swap memory recommended for linux depends on some factors including the amount of memory in the system and the work load on the memory.