Limiting swap wear
8. With the action described below, you limit the use of the swap file
or partition (the virtual memory on the SSD). Without disabling it
entirely, because that would go too far: in case of very heavy RAM load,
your Linux has to be able to "swap" to the hard disk.
Linux's inclination to use the swap, is determined by a setting called
swappiness. The lower the setting number, the more system load is
required before your Linux starts using the swap.
On a scale of 0-100, the default setting is 60. Which is much too high
for normal desktop use. For SSD's, it also causes too many disk writes.
A detailed explanation can be found here (link dead? Then download this pdf file with the same content).
This is the how-to for decreasing the swappiness to a more reasonable level:
a. Check your current swappiness setting. Type in the terminal (use copy/paste):
cat /proc/sys/vm/swappiness
Press Enter.
The result will probably be 60.
ternyata punyaku 10, jadi tidak mengikuti langkah berikutnya
b. Now type in the terminal (use copy/paste):
xed admin:///etc/sysctl.conf
Press Enter. (for Ubuntu: type gedit instead of xed)
c. Add the following blue lines, at the very end of the existing text in that file (use copy/paste to avoid errors):
# Reduce the inclination to swap
vm.swappiness=20
d. Save the file and close it.
e. Reboot your computer. Then proceed to the next item.
0 comments:
Post a Comment