Swappiness
Encyclopedia
Swappiness is a property for the Linux kernel
Linux kernel
The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software....

 that changes the balance between swapping out runtime memory, as opposed to dropping pages from the system page cache
Page cache
In computing, page cache, sometimes ambiguously called disk cache, is a "transparent" buffer of disk-backed pages kept in main memory by the operating system for quicker access. Page cache is typically implemented in kernels with the paging memory management, and is completely transparent to...

.
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 help to improve overall performance, whereas setting it lower (even 0) may improve interactivity (decreasing response latency.)

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

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK