Walker News

How To Change Linux Kernel Parameters Dynamically And Persistently?

Sometimes, you might need to tune some of the Linux kernel parameters. When running database system on Linux using DB2 or Oracle, the default IPC limit of msgmni, shmmax, etc, is often required tuning for performance’s sake.

Here you go, if you have to do this but wonder how to change, update, or tune the Linux kernel parameters at runtime dynamically, as well as making these changes to be permanent or preserve the tuning persistently after each system reboot.
This guide is tested on RHEL 5.4 and should be applicable to most Linux distribution.

1) Log in with root user ID and run sysctl -a | less to check the current / default value of your interested kernel parameters.

2) Open the /etc/sysctl.conf with vi editor (or any text editor) to add in new kernel parameters value (update the entries if the parameters in question already exist). For example:
kernel.msgmni = 1024
kernel.shmmax = 2147483648
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

3) Now, run sysctl -p if you want to apply updates in sysctl.conf immediately. Linux automatically apply these updates in sysctl.conf on each reboot.

Custom Search

2017  •  Privacy Policy