Recommended swap size for Linux/RHEL systems

Recommended swap size for Linux systems

Recommended swap size for systems

Two importance of swapping is as, first like when system requres more memory than it is static available, the 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 is full then inactive pages in memory are moved to the swap filesystem .

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

SWAP Recommendation

2GB of RAM requires 2 times the amount of RAM
2GB-8GB RAM requires Equal to the amount of RAM
8GB to 64GB of RAM requires 0.5 times the amount of RAM
64GB of RAM requires 4 GB of swap space

recommended swap space if allowing for hibernation

2GB of RAM requires 3 times the amount of RAM
2GB-8GB RAM requires 2 times the amount of RAM
8GB to 64GB of RAM requires 1.5 times the amount of RAM
64GB of RAM requires No extra space needed

About Sachin Gupta

I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009. rocks!

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *