Swap分区tip(摘自Redhat官方文档)

Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then 1x physical RAM for any amount above 2 GB, but never less than 32 MB. 

Using this formula, a system with 2 GB of physical RAM would have 4 GB of swap, while one with 3 GB of physical RAM would have 5 GB of swap. Creating a large swap space partition can be especially helpful if you plan to upgrade your RAM at a later time. 

Tip      

If your partitioning scheme requires a swap partition that is larger than 2 GB, you should create an additional swap partition. For example, if you need 4 GB of swap, you should create two 2 GB swap partitions. If you have 4 GB of RAM, you should create three 2 GB swap partitions. Red Hat Enterprise Linux supports up to 32 swap files. 

For systems with really large amounts of RAM (more than 32 GB) you can likely get away with a smaller swap partition (around 1x, or less, of physical RAM). 

翻译 :当物理内存小于2G时,swap大小为物理内存的2倍。当物理内存大于2G,超过2G的部分,swap大小跟物理内存相等。
即:
    x<=2G的部分, swap=2x;
    x>2G的部分, swap= (2*2G)+( x-2G)
利用这个法则,2G物理内存需要4G swap,而3G物理内存则需要5G swap。如果你打算添加内存的话,创建一个大些的swap区是很有帮助的。
Tip
如果按照分区计划,你的swap区超过2GB,那么应该创建另外的swap分区。
比如,你需要4GB的swap的分区,应该创建2个2GB的swap分区。

如果有4GB的物理内存,则应该创建3个2GB的swap分区。
Redhat EL支持多达32个swap文件。

分析:2GB的物理内存 需要swap 2x2GB=4GB,
超过2GB的2GB 需要swap 1x2GB=2GB。
总共6G,每个swap分区2G,所以是3个2GB的swap分区

对于超过32G物理内存的,使用小于等于物理内存容量的swap区会更好。