[CentOS] Re: Apparently no swap configured

Christopher Chan christopher.chan at bradbury.edu.hk
Thu Oct 30 00:36:43 UTC 2008

Stephen Harris wrote:
> On Wed, Oct 29, 2008 at 09:56:34AM -0400, James B. Byrne wrote:
>> I believe that the current recommendation is 2 x physical memory up to 2
>> GB and then 1 x physical memory thereafter.
>> See:
>> http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/html/Deployment_Guide/s1-swap-what-is.html
>> " 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.
> That's a silly recommendation, and never been true for Linux.  RedHat
> don't always know what they're talking about.
> In older BSD systems (eg around SunOS 4 times or before) swap space was
> utilised oddly; all memory was allocated from swap, so you needed _at
> least_ <physmem> of swap just to use all your real memory!  So if you
> added <physmem> of swap then your total virtual memory size was still
> only <physmem>.  No help!  So the rule of thumb came along that said
> "swap = 2*<physmem>" and that gave you a VM of 2*<physmem>.   Linux never
> did this (and I don't think modern BSDs do, either) so adding <physmem>
> of swap will automatically give you twice <physmem> of VM.

Ah, yes, not an older release of Solaris...SunOS4

A certain release of SunOS4 required swap be twice the amount of RAM or 
it would crash according to an article that I read but I cannot find 
right now. Here is a FAQ article related to SunOS that tells us how 
SunOS4 handled virtual memory (swap must be at least the same amount of 
RAM): http://www.bjnet.edu.cn/sun-admin/FAQ/F-comp-sys-sun/Q30-0.html

The source of this 'recommendation' that swap be twice that of RAM is 
affects more than just Linux


So please, stop spreading this swap should be twice the amount of RAM 
installed nonsense.

/me gets off soapbox.

More information about the CentOS mailing list