Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2013 09:56:53 +0000 (UTC)
From:      jb <jb.1234abcd@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: 
Message-ID:  <loom.20130527T115233-867@post.gmane.org>
References:  <1369558712.96152.YahooMailNeo@web165006.mail.bf1.yahoo.com> <loom.20130526T143506-872@post.gmane.org> <1369644392.92027.YahooMailNeo@web165003.mail.bf1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
M. V. <bored_to_death85 <at> yahoo.com> writes:

> ... 
> > Swapping by itself can decrease system reliability due to possible
> > data corruption on swap disk or during two-way transfers, with 
> 
> > subsequent incorrect RAM and machine crash.
> >
> > But, swapping is also a symptom, not a problem.
> > It is never a good idea to let it get to that point.
> ...
> 
> >
http://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/
> 
> Very interesting point.
> - do you think this could hurt my server's stability too? (most of its
work is a noticeable amount of
> packet-forwarding, and other network services, like firewall, dhcp server,
ntp server, etc)
> - if so, in what conditions? can I do something to prevent this? or should
I just get rid of the swap partition?
> 
> - does swap partition do any good for me at all? I mean if we even suppose
nothing bad happens because of it, is
> it worth risking to keep it? 
> 
> thank you.

I wish there was a clear answer.

There are two schools practised by server owners:
- with swap space (partition or file)
  They see swapping as a symptom (of a problem, real or potential), and they 
  treat it as a useful early warning device that gives them time to act.
  If prolonged or unattended, swapping may slow down the system and even end
up   in "thrashing", which is close to a terminal state.
- no swap space
  They are "purists" - when they set up a server for a specific purpose they   
  know it (requirements, apps run, resources assigned) and they are in charge.
  No "sissy" swapping, they do not trust those kernel algos, etc. 
  They know that out-of-memory kernel killer may terminate a process (perhaps 
  not the one they would expect) in case of memory crunch, but they think they 
  can live with it by closely watching system and app state indicators to
  prevent that from happening.

In the end it comes down to owner's preferences. 
If in doubt, try with and without swap space and see how it works in your
particular environment.

jb





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?loom.20130527T115233-867>