On Mon, 2011-01-17 at 16:23 -0800, Grant wrote:
> > I think the idea is never use swap if possible, but in a case where
> > you don't have swap space or run out of swap space I think it's still
> > possible to lose data.
> 
> Isn't swap just an extension of system memory?  Isn't adding 4GB of
> memory just as effective at preventing out-of-memory as dedicating 4GB
> of HD space to swap?  I can understand enabling swap on a laptop or
> other system with constrained memory capacity, but doesn't it make
> sense to disable swap and add memory on a 24GB server?
> 
> Is swap basically a way to save money on RAM?
> 
> - Grant
> 

No swap contains pages from memory that have not been accessed for
awhile so they can be stored elsewhere freeing ram for actual active
pages.  When they need to be accessed, they have to be swapped back in,
and often something swapped back out to make room for it.

And for those with gigabytes of swap, keep in mind that the majority of
processors can only access up to 32 x 2G swapfiles under linux, so 4G is
only going to be half used.  Some processors are only able to handle
very small swapfiles, whilst amd opterons can handle very large ones.  

It does appear however that some distros (redhat and suse ?) have
modified something to allow larger swap sizes on 64bit systems, but via
google it seems very muddy at the moment.

On my mostly 32bit systems its only the opterons (which are running
64bit systems) that can access more than 2G swap using gentoo-sources
kernels when I tested late last year.

BillK


-- 
William Kenworthy <bi...@iinet.net.au>
Home in Perth!


Reply via email to