[CentOS] Re: Apparently no swap configured

Stephen Harris lists at spuddy.org
Thu Oct 30 02:21:56 UTC 2008

On Wed, Oct 29, 2008 at 07:07:03PM -0700, John R Pierce wrote:
> Stephen Harris wrote:
> >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>.  

> now, on late model Solaris, 'swap' is also used as tmpfs, which /tmp and 

You also had this option on SunOS4 but it wasn't used by default and had
a lot of limitations and didn't really work too well for /tmp (IIRC,
didn't support FIFOs and some other file types).  The Solaris version
(first appeared in Solaris 2.1, so it's not _new_) is a LOT better :-)

> /var/run utilizes by default, so you definitely want to allocate 
> sufficient swap space for this at least, regardless of how large your 
> physical memory is.

And, no matter what, ensure you limit your /tmp size with the size=####m
option in vfstab, otherwise someone will clobber your machine!

To bring this back to Linux... Linux _also_ does have tmpfs which works
similarly to Solaris.  If you use that then also remember the size
option :-)



More information about the CentOS mailing list