Differences

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


sysctl [2015/11/30 21:24] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== sysctl ======
  
 +  * [[OpenBSD]]
 +  * [[NetBSD]]
 +
 +== Display disk drives ==
 +
 +<code>
 +sysctl hw.disknames
 +</code>
 +
 +==== Linux ====
 +
 +Changes to ''sysctl'' go in ''/etc/sysctl.conf''.
 +
 +Once your changes are made, you can reload from all the system files:
 +
 +<code>
 +sysctl --system
 +</code>
 +
 +To display all sysctl settings:
 +
 +<code>sysctl -a</code>
 +
 +You can set a value directly as well:
 +
 +<code>
 +sysctl -w net.ipv4.ip_forward=1
 +</code>
 +
 +=== Swappiness ===
 +
 +  * [[http://www.cloudibee.com/linux-performance-tuning-vm-swappiness/|Linux performance tuning – vm.swappiness]]
 +
 +In Linux, set the percentage to 10 in ''/etc/sysctl.conf'':
 +
 +<code>
 +vm.swappiness = 10
 +</code>
 +
 +[[https://en.wikipedia.org/wiki/Swappiness|Wikipedia references]]
 +
 +  * vm.swappiness = 0 - swap only to avoid an OOM
 +  * vm.swappiness = 1 - minimum amount of swapping without disabling it completely
 +  * vm.swappiness = 10 - recommended value when sufficient memory exists in a system

Navigation
QR Code
QR Code sysctl (generated for current page)