Tuesday, May 4, 2010

Preventing Swapping unless absolutely necessary

If you have lots of RAM, you may want to use RAM as I/O caches and buffers. The benefits of using RAM as I/O caches and buffers are definitely speed when compared to swapping data.

To review the value of swappiness can be seen by running the following commands
# cat /proc/sys/vm/swappiness

To modified by running the following command (0 will prevent swapping unless absolutely required)
# echo 0 > /proc/sys/vm/swappiness

To make the settings permanent, edit /etc/sysctl.conf
vm.swappiness=0

No comments: