Jump to content

Swappiness

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by AnomieBOT (talk | contribs) at 15:51, 14 September 2012 (Dating maintenance tags: {{Dead link}}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Swappiness is a property for the Linux kernel that changes the balance between swapping out runtime memory, as opposed to dropping pages from the system page cache. Swappiness can be set to values between 0 and 100 inclusive. A low value means the kernel will try to avoid swapping as much as possible where a higher value instead will make the kernel aggressively try to use swap space. The default value is 60, and for most desktop systems, setting it to 100 may affect the overall performance, whereas setting it lower (even 0) may improve interactivity (decreasing response latency.)[1]

To temporarily set the swappiness in Linux, as root you set the value to 100 with the following command:

echo 100 > /proc/sys/vm/swappiness

Permanent changes are made in /etc/sysctl.conf via the following configuration line(inserted if not present previously):

vm.swappiness = 100

External links

  • Documentation for /proc/sys/vm/* kernel version 2.6.29 authoritative documentation
  • "2.6 swapping behavior". May 5, 2004. Retrieved June 8, 2010.
  • "Linux: Tuning Swappiness". April 29, 2004. Retrieved June 8, 2010.[dead link]

References