[CentOS] Re: Swap Considerations

Fri Mar 2 13:13:05 UTC 2007
James Olin Oden <james.oden at gmail.com>

On 3/1/07, Adam Gibson <agibson at ptm.com> wrote:
> Scott Silva wrote:
> > William Warren spake the following on 2/27/2007 12:04 PM:
> >> I'm going to be different from most.  I don't believe in using swap at
> >> all.  I have my swap starting equal to my ram and as i go up i REDUCE
> >> the swap.  My vm.swappiness is always set to zero as swapping to disk is
> >> many times slower than keeping it in ram.
> >>
> > Yes, but a small bit of swap in an emergency condition wouldn't hurt, and dasd
> > is a lot cheaper than it used to be.
> But a lot of swap in some emergencies can cause more problems that they
> solve.  I have several times over the years had an app start eating up
> memory and my system will get to a point that it is useless for a VERY
> long time while even trying to log in can take a very long time(hour) or
> never finish because your system is so busy moving tasks back and forth
> into and out of swap under that condition.
> I prefer for my desktop system to have plenty of RAM.  If swap is ever
> filled up by even 64 megs something is wrong.  By setting swap very low
> and making sure I have plenty of memory if some app does start eating up
> memory the oom killer will kill the task much faster if your system
> isn't busy trying to swap 512 megs of running tasks that got pushed into
> swap because of one runaway app.
The problem with the OOM killer is it cannot differentiate between
mission critical apps and other not so critical.  Course, once you
really do run out of memory what other choice do you have?  An
automatic orderly shutdown and reboot (that actually might be a better
choice for telco/CGL environments).  Anyway just some thoughts...james

> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos