一般情况下swap分区的大小设置为内存的两倍,如果1T内存,是不是要设置2T的交换分区呢?
2010-07-06 16:04:19
在redhat的文档网站上看到推荐设置方法:
Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.
So, if:
M = Amount of RAM in GB, and S = Amount of swap in GB, then
If M < 2 S = M *2
Else S = M + 2
如果内存小于两g就用内存的两倍大小来做交换分区,如果大于两g就用内存的大小加上两g来做交换分区。