On Linux, how to change the Kernel Parameter values (sysctl.conf)?


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:

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 

Discover More
Card Puncher Data Processing
Exalytics - Timesten Configuration

Timesten on Exalytics To set the resource limits for TimesTen: Make the following changes and additions to the /etc/security/limits.conf file: Make the following shared memory kernel settings in...
Linux - (Huge|Large) pages

Large page also known as “huge pages”. If large pages are supported by the kernel, there should be special files in the /proc directory that indicate the number and size of the large pages. Since...
Linux - Kernel parameters (configuration files)

Kernel parameters are the configuration of the Linux kernel (ie linux). sysctl is the command line tool that manage the kernel parameters. See If you want to change the kernel parameter values,...
Oracle Database 11gr2 Typical Installation
Oracle Database - Installation 11g Release 2 (11.2) on Linux OEL 5 (X86)

Installation of Oracle Database 11g Release 2 (11.2) on Oracle Enterprise Linux 5. Linux OEL installation login as root RAM: At least 1 GB swap space The following table describes...
Oracle Database Installationl Location 11gr2 Oel Linux X86 64
Oracle Database 11gR2 - Installation on Linux OEL 5 Update 5 (x86_64)

Installation of Oracle Database 11g Release 2 (11.2) x86_64 on Oracle Enterprise Linux 5 Update 5 on the file system (ie without ASM) or GRID. Linux OEL installation login as root ...
Data System Architecture
Parallel programming - Semaphore (Counter Variable)

A semaphore is a variable that control the access (physical or logical) by multiple thread to a common resource. A semaphore is a data structure that is initialized to a positive integer value and that...
Card Puncher Data Processing
SAP ERP 6 EHP5 - Installation Java Linux

can be the same as the must follow the same restriction than the . Using the SAP Management Console (SAP MC) Using commands Installation...
Timesten Component
Timesten - (Large|Huge) Pages Configuration

If a TimesTen database larger than 256GB is required, then you must configure Timesten in order to use large pages. Depending upon the Operating System you are using, you should look into enabling large...
Timesten Component
Timesten - Database Installation and configuration on Linux

On UNIX/Linux systems before installing application, you must in general configure the following: The number of semaphores Allowable shared memory In addition for timesten, you need to perform the...

Share this page:
Follow us:
Task Runner