Database performance optimization involves all aspects of the entire database operating environment, such as the operating system, Oracle itself, storage, and network. The operating system is the cornerstone of Oracle's stable operation and maximum performance. This article mainly describes the configuration of Oracle Kernel Parameters Based on Linux.
Verify that the value of the Kernel Parameter displayed in the list below is set to greater than or equal to the minimum value shown below.
If the current value of any parameter in your system is greater than or higher than the value listed below, do not modify it.
The following steps show how to verify and set the values of these parameters.
Run the following command for verification:
/Sbin/sysctl-a | egrep "kernel. shmall | kernel. shmmax | kernel. shmmn | kernel. sem"
Then compare the values listed in the following table
Note: The following table shows the minimum Kernel Parameters and shell restrictions. For production databases, it is recommended that Oracle adjust these values to optimize database performance. For more information about Kernel optimization parameters, see the relevant operating system documentation.
Oracle Kernel Parameter reference value
Parameter |
Minimum Value |
Recommended value |
File |
Semmsl Semmns Semopm Semmni |
250 32000 100 128 |
Set only if those that are set by OS or other applications are lower |
/Proc/sys/kernel/sem |
Shmall |
2097152 |
Shmmax/page_size Usually page_size = 4 |
/Proc/sys/kernel/shmall |
Shmmax |
Minimum of the following values: · Half the size of the memory · 4 GB-1 byte Note: The minimum value required for shmmax is 0.5 GB. However, Oracle recommends that you set the value of shmmax to 2.0 GB for optimum performance of the system. |
Half of RAM or if swap file is less then half of RAM the size of swap file |
/Proc/sys/kernel/shmmax |
Shmmni |
4096 |
/Proc/sys/kernel/shmmni |
File-max |
512 * PROCESSES |
/Proc/sys/fs/file-max |
Ip_local_port_range |
Minimum: 9000 # Maximum: 65000 |
/Proc/sys/net/ipv4/ip_local_port_range |
Rmem_default |
262144 |
/Proc/sys/net/core/rmem_default |
Rmem_max |
4194304 |
/Proc/sys/net/core/rmem_max |
Wmem_default |
262144 |
/Proc/sys/net/core/wmem_default |
Wmem_max |
1048576 |
/Proc/sys/net/core/wmem_max |
Tcp_wmem |
262144 |
/Proc/sys/net/ipv4/tcp_wmem |
Tcp_rmem |
4194304 |
/Proc/sys/net/ipv4/tcp_rmem |
Verify Kernel Parameters
Follow these steps to view the value of a specified parameter and modify it if necessary.
Run the corresponding commands in the following table to display the value of these kernel parameters, and Mark whether the value of this parameter needs to be modified.
Parameter |
Command |
Semmsl, semmns, semopm, and semmni |
#/Sbin/sysctl-a | grep sem This command displays the value of the semaphore parameters in the order listed. |
Shmall, shmmax, and shmmni |
#/Sbin/sysctl-a | grep shm This command displays the details of the shared memory segment sizes. |
File-max |
#/Sbin/sysctl-a | grep file-max This command displays the maximum number of file handles. |
Ip_local_port_range |
#/Sbin/sysctl-a | grep ip_local_port_range This command displays a range of port numbers. |
Rmem_default |
#/Sbin/sysctl-a | grep rmem_default |
Rmem_max |
#/Sbin/sysctl-a | grep rmem_max |
Wmem_default |
#/Sbin/sysctl-a | grep wmem_default |
Wmem_max |
#/Sbin/sysctl-a | grep wmem_max |
Tcp_wmem |
#/Sbin/sysctl-a | grep tcp_wmem |
Tcp_rmem |
#/Sbin/sysctl-a | grep tcp_rmem |