The Database Installation Guide on different Oracle platforms provides some recommended system parameter settings for Oracle deployment. However, the recommended value is a general conclusion, not
The Database Installation Guide on different Oracle platforms provides some recommended system parameter settings for Oracle deployment. However, the recommended value is a general conclusion, not
The Database Installation Guide on different Oracle platforms provides some recommended system parameter settings for Oracle deployment. However, the recommended value is a general conclusion, it does not completely meet different needs. Using different operating system kernel parameters will make the database performance quite different. This article describes the settings of several main kernel parameters in linux for your reference.
1. Linux shared memory
Shared Memory is a buffer allocated in the system kernel. Multiple processes can access the buffer.
Because the process can directly read and write the memory, avoiding switching between the kernel space and the user space, the shared memory read and write efficiency is very high.
When a process changes the content of this address, other processes will notice this change. Shared Memory is similar to memory image files in windows programming.
Interprocess Communication Mechanism in Linux: it refers to the method by which multiple processes communicate with each other and exchange information.
By using the shared memory, two or more processes are allowed to share a certain storage zone, because data does not need to be copied.
Oracle SGA is based on this method to achieve data sharing between Oracle processes. Therefore, the proper SGA settings have a significant impact on Oracle performance.
You can use ipcs-lm to view all the shared memory settings.
2. Parameter Modification Method
Because the Linux Kernel Parameter information is stored in the memory, you can directly modify it using the command and the modification takes effect directly.
However, after the system restarts, the original parameter values will be lost, and the system will automatically read the kernel parameters from the/etc/sysctl. conf file each time it is started.
If it is temporary modification, you can use echo or sysctl-w mode. If it is permanent modification, we recommend that you modify the sysctl. conf file.
The following describes how to modify parameters.
A. echo Method
Echo >
Output the value to the file. In this way, the Kernel Parameter Modification takes effect immediately. You do not need to restart the system, but it becomes invalid after restart (subject to the permanent configuration file sysctl. conf)
B. sysctl command
Sysctl-w =
The sysctl command line is used to modify the kernel parameters during running. The parameter value is invalid after restart, as shown in the preceding figure.
C. permanent changes
Vi/etc/sysctl. conf # directly modify the value of the corresponding parameter, and then execute the command to make the change take effect immediately # sysctl-p
Echo "kernel. shmmax = 2147483648">/etc/sysctl. conf # This method is not recommended, so that multiple values of the same parameter will appear in sysctl. conf.
3. sysctl. conf configuration file
Almost all important parameters are stored in the sysctl. conf configuration file. Therefore, it is easiest to directly modify the file for Permanent modification.
The following are recommended parameter values based on Oracle in x86_64 RHEL5.
Oracle10gR2 On RHEL 5/OEL 5 (x86_64) [ID 421308.1]
Kernel. shmall = physical RAM size/pagesize
For most systems, this will be the value 2097152. See Note 301830.1 for more information.
Kernel. shmmax = 1/2 of physical RAM.
This wocould be the value 2147483648 for a system with 4 Gb of physical RAM. See Note 567506.1 for more information.
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Fs. file-max = 512 x processes (for example 65536 for 128 processes)
Development recommends a minimum of 327679 for active systems.
Net. ipv4.ip _ local_port_range = 9000 65500
(The runInstaller (OUI) checks may fail CT this to be the old guidance of 1024 65000.
The new guidance from Oracle development is 9000 65500.
Please allow the runInstaller (OUI) to proceed with the new guidance from Oracle development .)
Net. core. rmem_default = 262144
Net. core. rmem_max = 2097152
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
Oralce 11g R2 on RHEL (and OEL) 5 on AMD64/EM64T [ID 880989.1]
Kernel. shmall = physical RAM size/pagesize
For most systems, this will be the value 2097152. See Note 301830.1 for more information.
Kernel. shmmax = 1/2 of physical RAM.
This wocould be the value 2147483648 for a system with 4 Gb of physical RAM.
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Fs. file-max = 512 x processes (for example 6815744 for 13312 processes)
Fs. aio-max-nr = 1048576
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 = 1048576
For Oracle 11g, it is recommended that you retain the original value if the current value is greater than the value listed above.
We can see from the above that sysctl. conf contains all kernel Parameter files starting with kernel and describes these important parameters one by one.