I have had to fix a lot of Linux machines that we have outsourced the hosting on because that the hosting partners Linux specialists can’t set up the system correctly that’s why I am going to do a series of recommended environment set-up recommendations here. The recommendations is cut and pasted directly from RedHat’s recommendations.
This time I will give you a simple table of swap recommendations that you should follow if you are setting up a system with RedHat Enterprise 6.x / CentOS 6.x and Fedora 6.x
Amount of RAM in the system | Recommended swap space | Recommended swap space if allowing for hibernation |
⩽ 2GB | 2 times the amount of RAM | 3 times the amount of RAM |
> 2GB – 8GB | Equal to the amount of RAM | 2 times the amount of RAM |
> 8GB – 64GB | 0.5 times the amount of RAM | 1.5 times the amount of RAM |
> 64GB | 4GB of swap space | No extra space needed |
Note
Swap space size recommendations issued for Red Hat Enterprise Linux 6.0, 6.1, and 6.2 differed from the current recommendations, which were first issued with the release of Red Hat Enterprise Linux 6.3 in June 2012 and did not account for hibernation space. Automatic installations of these earlier versions of Red Hat Enterprise Linux 6 still generate a swap space in line with these superseded recommendations. However, manually selecting a swap space size in line with the newer recommendations issued for Red Hat Enterprise Linux 6.3 is advisable for optimal performance.