Walker News

Red Hat Enterprise Linux Swap Size Recommendation

Are you looking for the recommended Linux swap partition size for a server with huge amount of RAM installed? Well, I have just stumbled upon one of such recommendation from RHEL documentation while I was actually looking for reference of previous topic.

Some of you, especially the veterans, might know there is this good old formula that suggest swap space size should be at least 1.5 times (some even said 2 times) of the RAM installed.

Nowadays, most of the brand new servers easily come with few tens to hundred gigabytes of RAM installed. Apparently, the required Linux swap file system size will be darn huge if to apply this formula and you wonder is this really needed and justified.

With reference to RHEL 5.5 installation guide, the new study suggests that the amount of swap space needed by a system is much depends on the memory workload running on that system.

This sound reasonable but not practical, as it is not easy to gauge memory workload before the system is running. Thus, the RHEL engineers suggest their own recommended swap space:
  • Min. 2GB of swap space for system installed with 4GB of RAM or less
  • Min. 4GB of swap space for system installed with 4GB to 16GB of RAM
  • Min. 8GB of swap space for system installed with 16GB to 64GB of RAM
  • Min. 16GB of swap space for system installed with 64GB to 256GB of RAM
  • Min. 32GB of swap space for system installed with 256GB to 512GB of RAM

In addition, the swap space should be spanned across multiple disk drives for the performance’s sake.

Although the reference is made for RHEL 5.5 running on x86, AMD64, and Intel64 system, I think it is worth for reference or applied with little adjustment if you’re not working with RHEL. But for CentOS users, you probably know that this reference should works too :-)

Custom Search

  1. Bob 01-10-10@03:39

    I was at a customer site recently and the topic of swap space seemed to be a little controversial. (Actually I have still been quoting the old method of RAM+2GB). The recommendations you list on this page sound very reasonable and I would like to use this information in the future.

    Can you share the source of the RHEL5.5 recommended swap settings?

    Is there anything direct from Red Hat that I can reference and use?

  2. Walker 02-10-10@11:27

    @Bob, that link in the post should refer the source BUT just know that Redhat changes the link without doing a good redirection :-(

    Anyway, here you go:


2017  •  Privacy Policy