About
This article talks about the Kernel Parameters Management, and shows you how to change them.
How to
Get the value of a parameter?
Enter the following command to display the current values of the kernel parameters:
/sbin/sysctl -a | grep para
where para is the beginning letters of the kernel parameter(s).
For instance to show the semaphore parameters:
/sbin/sysctl -a | grep sem
Change the value of a parameter?
If the value of any kernel parameter is different from the minimum value you want, then perform the following:
- Using any text editor, create or edit the /etc/sysctl.conf file, and add or edit lines similar to the following:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
- By specifying the values in the /etc/sysctl.conf file, they persist when you restart the system.
- Include lines only for the kernel parameter values that you want to change.
- If any of the current values are larger than the minimum value, then specify the larger value.
- For the semaphore parameters (kernel.sem), you must specify all four values.
- On SUSE Linux Enterprise Server systems, you must perform other command to ensure that the system reads it.
- After updating the values of kernel parameters in the /etc/sysctl.conf file, either restart the computer, or run the following command to make the changes in the /etc/sysctl.conf file available in the active kernel memory:
/sbin/sysctl -p
Review the output from this command to verify that the values are correct. If the values are incorrect, edit the /etc/sysctl.conf file, then enter this command again.
- Enter the command below to confirm that the values are set correctly.
/sbin/sysctl -a