[CentOS] Postpone/avoid swaping while there is still free RAM.

Tue Jun 20 17:47:32 UTC 2006
Jim Perrin <jperrin at gmail.com>

-----------------
>
> There is plenty of free ram, but the kernel prefers to swap unused
> pages to disk. And later I have to wait for them to be unswapped, the
> Desktop looses its promptness - annoying.

This is a bug in the -34 and -34.0.1 kernels and possibly 1 or 2
before that. Systems under load swap prematurely. You can install the
test kernel from the dev tree which will be in the upcoming 4.4
release. Your issue is fixed in that kernel.

You may also want to set 'vm.swappiness = 10'  or so in
/etc/sysctl.conf (reread without rebooting with sysctl -p)

The lower the number (0-100) you set for swappiness, the less willing
your system will be to swap. No setting it to 0 will not keep your
system from swapping at all.

> In win2k and winXP there is a registry key property which prevents
> swapping while there is still RAM.
>
> Do you know whether I can achieve the same in linux?



-- 
This message has been double ROT13 encoded for security. Anyone other
than the intended recipient attempting to decode this message will be
in violation of the DMCA