We typically install the Oracle database on Linux or configure the core parameters of the Linux system when replacing or upgrading the hardware, and then adjust the Oracle system parameters. The actual meaning of these parameters is what, why to make adjustments, how to adjust rationally? With these questions we do some of the following analysis and testing.
Note: Some of the following tests may apply only to Linux systems, and testing Linux systems may be different for 64bit,32bit Linux systems.
Test environment: Linux as 4.0 U5 64Bit
Core version: 2.6.9-55.ELSMP #1 SMP x86_64
1. The core parameters of Linux system:
[Root@ecsdb etc]# cat sysctl.conf or under/proc/sys/kernel view.
Kernel.shmall = 2097152
Kernel.shmmax = 8405194752
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Fs.file-max = 65536
Fs.file-max = 65536
Net.ipv4.ip_local_port_range = 1024 65000
Net.core.rmem_default = 262144
Net.core.rmem_max = 262144
Net.core.wmem_default = 262144
Net.core.wmem_max = 262144
Tip: Change the/etc/sysctl.conf file immediately after the command is effective
# sysctl-p
2. Linux Core parameter adjustment
Kernel.shmmax----Shmmax Available physical memory defines the maximum allowable one shared sizeof memory. The SHMMAX setting should is large Enoughto the hold SGA in one shared entire memory. A Low setting Cancause creation of multiple shared memory segments which could lead toperformance degradation.
Shmmax is one of the most important parameters in the core parameter that defines the maximum value of a single shared memory segment.
The Shmmax setting should be large enough to accommodate the entire SGA under a shared memory segment, and setting it too low may
Causes the need to create multiple shared memory segments, which can result in degraded system performance.
Some of the comments on the forum: SHMMAX is just a number to compare when a shared-memory segment is created, when a shared memory segment is created by a process, the operating system checks that the value of the shared memory segment being requested is greater than the SHMMAX value, and if so, an error is thrown. This time the system creates another one or more shared memory segments to meet the requirements of the process. In general, the number of shared memory segments is not directly related to system performance, nor does it have a significant impact on performances.
As Steve Adams said in his brochure, when instance startup and server process creation, multiple small shared memory segments may cause minor system performance degradation at the time (at startup, you need to create multiple virtual address segments to allow the process to perform multiple segments when the process is created) "Recognition" will have some impact), but it will not be affected at other times. This means that if your program is not a regular create processes (and destroy Them), performance is not a concern.
Of course Oralce's advice is to expect a large shared memory segment to accommodate the entire SGA, so that there is no risk of even slight performance degradation at all times. Oracle Installation documentation recommends that the 32Bit Linux system set Shmmax to the 32Bit maximum limit (setting Shmmax to the 32-bit number limit), which is 4G.
So in general, 1-4g physical memory, you can directly set the Shmmax to the maximum physical memory, then the SGA must be in a shared memory segment, 32Bit Linux system physical memory greater than 4G set to 4G.
In summary, general settings Shmmax >=SGA (32Bit system support to 1.7G above SGA needs attention). If the Linux operating system is 64Bit, Shmmax is set to be greater than sga_max_size.
Ipcs-sa can see the number of shared memory segments
Kernel.shmall----Kernel.shmall parameter is to control the number of shared memory pages. The Linux Shared memory page size is 4KB and the shared memory segment is an integer multiple of the size of the shared memory page. The maximum size of a shared memory segment is 16G, then the number of shared memory pages is 16gb/4kb=16777216kb/4kb=4194304 (page), that is, 64Bit system under 16GB physical memory, set Kernel.shmall = 4194304 To meet the requirements (almost twice times the original setting of 2097152). At this point can adjust the Shmmax parameter to 16G, while you can modify the Sga_max_size and Sga_target 12G (you want to set the maximum size of the SGA, of course, can be 2g~14g, but also to coordinate PGA parameters and OS and other memory use, can not set too full, such as 16G).
Kernel.shmmni----Shmmni Kernel parameter is the maximum number of shared memory segments (note that this parameter is not shmmin, is Shmmni, and shmmin represents the minimum size of the memory segment). The default value of Shmmni is 4096, which is generally sufficient.
3. Parameters to be adjusted under Oracle
Sga_max_size
Sga_target
Db_cache_size
Sga_max_szie is an example of the SGA limit that can be used, a static parameter that cannot be dynamically modified.
Sga_target for 10g launch of the SGA Automatic management parameters, dynamic parameters, can be dynamically modified.
The relationship between Sga_max_size and the size of the SGA components
This article URL address: http://www.bianceng.cn/OS/Linux/201410/45486.htm