[CentOS] Re: Swap Considerations

Adam Gibson agibson at ptm.com
Thu Mar 1 21:58:09 UTC 2007


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.




More information about the CentOS mailing list