一般地, 内存小于2G ,则swap=2*RAM, 内存大于2G, 则swap=2+RAM, 然后满足上述规则就行。 转载于:https://www.cnblogs.com/lsy-ai/p/5143579.html