[CentOS] Swap

Mon Jun 5 20:21:26 UTC 2006
Rodrigo Barbosa <rodrigob at suespammers.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jun 05, 2006 at 04:15:35PM -0400, Sam Drinkard wrote:
> >On Mon, Jun 05, 2006 at 02:01:52PM -0600, Joshua Gimer wrote:
> >>On 6/5/06, Max H. <btmanmeh at verizon.net> wrote:
> >>   Kai Schaetzl wrote:
> >>   > where do you set "swappiness"?
> >>
> >>   Echo a value 0 to 100 into /proc/sys/vm/swappiness.
> >>
> >>   Higher the number, more swap.
> >>
> >>   Here's an interesting argument from some kernel developers:
> >>
> >>   <http://kerneltrap.org/node/3000>
> >>
> >>I would at least keep a little bit of swap space. If you were to ever run 
> >>out
> >>of physical memory it WILL cause a kernel panic. Just a suggestion.
> >>   
> >
> >And that is why we are suggesting changing swappiness instead of
> >turning of swap.
> > 
> I assume then, with swappiness set to 0, *if* the system does happen to 
> need some extra pages, then it *will* go into swap, but only if all 
> memory is exhausted?  Zat sound right?

About right. It will still choose which pages it will swap out first
(buffers and cache blah blah).

Swappiness control how willing the system is to swap. If you set it to 0,
it will only swap if it is really needed. At 100, it will do a lot of
"preventive" swap, keeping more real memory free for cache and buffers.

- -- 
Rodrigo Barbosa <rodrigob at suespammers.org>
"Quid quid Latine dictum sit, altum viditur"
"Be excellent to each other ..." - Bill & Ted (Wyld Stallyns)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEhJJGpdyWzQ5b5ckRAmiiAJ4zl6JfM3PVwxxORbOCmOOkHzOuAACghP5r
mCsoZQgTa/M2/ggY0PTCIk0=
=hO7V
-----END PGP SIGNATURE-----