Ben Stienstra

Linux, Unix, network, radio and more...

User Tools

Site Tools


reduce_swappiness

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reduce_swappiness [2014/05/22 10:14]
admin
reduce_swappiness [2014/05/22 11:18]
admin
Line 2: Line 2:
 If you have enough RAM, then you can reduce swappiness and thus avoid writes to swap. If you have enough RAM, then you can reduce swappiness and thus avoid writes to swap.
  
-  * Check current setting: <​code>​cat /​proc/​sys/​vm/​swappiness</​code>​+  * Check current setting: <​code>​cat /​proc/​sys/​vm/​swappiness 
 +cat /​proc/​sys/​vm/​vfs_cache_pressure</​code>​
   * Change setting, edit **/​etc/​sysctl.d/​swappiness.conf**. <​code>​mkdir -p /​etc/​sysctl.d   * Change setting, edit **/​etc/​sysctl.d/​swappiness.conf**. <​code>​mkdir -p /​etc/​sysctl.d
-vi /​etc/​sysctl.d/​swappiness.conf</​code>​ +vi /​etc/​sysctl.d/​swappiness.conf</​code><​code>​vm.swappiness=1
-<​code>​vm.swappiness=1+
 vm.vfs_cache_pressure=50</​code>​ vm.vfs_cache_pressure=50</​code>​
   * Then activate the change. <​code>​sysctl -p /​etc/​sysctl.d/​swappiness.conf</​code>​   * Then activate the change. <​code>​sysctl -p /​etc/​sysctl.d/​swappiness.conf</​code>​
  
reduce_swappiness.txt · Last modified: 2014/05/22 11:18 by admin