12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System Configuration—Tuning PerformanceTweaking Kernel Variables using SYSCTLThe sysctl(8) utility allows system administrator to read or modify certain kernelvariables during system run time. There are more than a thousand variables outof which, some of them are read-only and cannot be changed during the run time,while some others can be modified to change the kernel's behavior.Some variables are read-only while the system is running, but can be setup during system boot from /boot/loader.conf or by hard codingthe variable into the kernel configuration, which is discussed later inthis chapter.All the variables are divided into different categories. The most importantcategories include:• dev: This catogory contains device node related variables.• hw:This category contains hardware related variables.• kern: This category contains kernel related variables.• net: This category contains network stack related variables.• security: This category contains security related variables.• vfs: This category contains file system related variables.• vm: This category contains virtual memory related variables.You can see a complete list of sysctl variables by running the sysctl –a command.However, the output of this command can be very long. Combining the grep(1) tosearch for certain variables can be very useful:# sysctl -a | grep recvspacenet.local.stream.recvspace: 8192net.local.dgram.recvspace: 4096net.inet.tcp.recvspace: 65536net.inet.udp.recvspace: 42080net.inet.raw.recvspace: 8192The current value of a sysctl variable can be examined by using the followingsysctl(8) command:# sysctl net.inet.ip.forwardingnet.inet.ip.forwarding: 0[ 88 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!