[CentOS] Swap Considerations

Wed Feb 28 00:58:28 UTC 2007
David Mackintosh <David.Mackintosh at xdroop.com>

On Wed, Feb 28, 2007 at 08:48:01AM +0800, Feizhou wrote:
> >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.
> OH come on, you don't need to do that for a DESKTOP! Or do you really do 
> this for your deskop?

The answer is, as always, "it depends."  This is one of those edge
cases which has practically nothing to do reality.

One of my customers got very unhappy because his 16G system only had
2G of swap, and his app was now happilly making working sets in
excess of 20G.  (They knew what the size of the working set was
because an otherwise identical system which did have 16G of swap was
showing a peak load of 20G.) 

When confronted with this, I argued that if the working set was in
any way dynamic they'd be far better off taking all the RAM out of
one box and putting it into the second and running two jobs
sequentially on it (or even better, buy more RAM for both computers).
However, detailed examination showed that most of this working set
was not dynamically used -- it was written into RAM, then
post-processed into a file (which, of course, was almost immediately
dumped).  So while things got slow at the end, it wasn't faster to
run two jobs sequentially on a single machine with all the RAM.

Like I said, this example has almost nothing to do with reality.

-- 
 /\oo/\
/ /()\ \ David Mackintosh | 
         dave at xdroop.com  | http://www.xdroop.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20070227/392081ee/attachment-0005.sig>