Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The case of Oracle Study-- installing Oracle Kernel Parameter configuration

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The case of Oracle Study-- installing Oracle Kernel Parameter configuration

In Linux system, before installing Oracle, in addition to checking whether the hardware and software of the operating system meet the installation needs, a key point is to modify the kernel parameters, the most important of which is the memory-related parameter settings.

Case study:

View the kernel parameter configuration of the current system:

[root@rh7 ~] # sysctl-pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1error: "net.bridge.bridge-nf-call-ip6tables" is an unknown keyerror: "net.bridge.bridge-nf-call-iptables" is an unknown keyerror: "net.bridge.bridge-nf-call-arptables" is an unknown Keyfs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250100100 128net.ipv4.ip_local_port_range = 32000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586

SHMMAX parameters:

The maximum value of a separate shared memory segment that can be allocated by the Linux process. It is generally set to half the total memory size. The setting of this value should be greater than the value of SGA_MAX_TARGET or MEMORY_MAX_TARGET, so for systems where Oracle databases are installed, the value of shmmax should be greater than 1/2 of memory.

# grep MemTotal / proc/meminfo

# cat / proc/sys/kernel/shmmax

The above command is to check the amount of memory in the system, as well as the current shmmax settings.

# echo 21474836480 > / proc/sys/kernel/shmmax

# sysctl-w kernel.shmmax=21474836480

# echo "kernel.shmmax=21474836480" > > / etc/sysctl.conf

These are several ways to set the shmmax parameter, all three of which can set the shmmax to 20g. This parameter can be modified without restarting the database. Personally, it is recommended to use the second sysctl command. Using the third method requires a sysctl-p operation or restart, but it is necessary to ensure that the setting value is still in effect after the next restart. The first two ways are similar to alter system set scope = memory, while the third is similar to alter system set scope = spfile.

SHMMNI parameters:

Sets the maximum number of shared memory segments at the system level. Oracle10g recommends a minimum value of 4096, which can be appropriately increased compared to 4096.

# cat / proc/sys/kernel/shmmni

# echo 4096 > / proc/sys/kernel/shmmni

# sysctl-w kernel.shmmni=4096

# echo "kernel.shmmni=4096" > > / etc/sysctl.conf

The method of checking and setting is as above, which is no different from the modification of shmmax, and will not be repeated.

SHMALL parameters:

Sets the total number of pages in shared memory. It is possible that this value is too small to cause a database startup error. Many people only pay attention to the SHMMAX parameter when adjusting the system kernel parameters, ignoring the setting of the SHMALL parameter. This value is recommended to be set to the physical memory size divided by the paging size.

# getconf PAGE_SIZE

Get the page size through getconf, which is used to calculate the reasonable setting value of SHMALL:

SQL > select 32 "1024" 1024 Universe 4096 from dual

32 "1024" 1024 "1024" 4096

--

8388608

For systems with 32GB of memory and 4K paging size, the value of SHMALL should be set to 8388608.

# cat / proc/sys/kernel/shmall

# echo 8388608 > / proc/sys/kernel/shmall

# sysctl-w kernel.shmall=8388608

# echo "kernel.shmall=8388608" > > / etc/sysctl.conf

The query and setting methods are as above.

Semaphores semaphores are counters that provide synchronization when processes or threads access shared memory.

SEMMSL parameters:

Set the maximum number of semaphores in each semaphore group, and the recommended minimum value is 250. For systems with a large number of concurrent connections, it is recommended that this value be set to the PROCESSES initialization parameter plus 10.

SEMMNI parameters:

Sets the maximum number of semaphore groups in the system. The recommended values for Oracle10g and 11g are 142g.

SEMMNS parameters:

Sets the maximum number of semaphores in the system. The operating system does not exceed LEAST (SEMMNS,SEMMSL*SEMMNI) when assigning semaphores. In fact, if the value of SEMMNS exceeds SEMMSL*SEMMNI, it is illegal, so the recommended value of SEMMNS is set to SEMMSL*SEMMNI. Oracle recommends that the setting of SEMMNS should not be less than 32000. If the PROCESSES parameter of the database is set to 600, the setting of SEMMNS should be:

SQL > select (600mm 10) * 142from dual

(600-10) * 142

-

86620

SEMOPM parameters:

Sets the maximum number of semaphore operations that can be performed simultaneously per system call. Since a semaphore group can have up to SEMMSL semaphores, it is recommended that SEMOPM be set to the value of SEMMSL. The configuration of SEMOPM for 10.2 and 11.1 verified by Oracle is 100.

You can check the semaphore-related configuration with the following command:

# cat / proc/sys/kernel/sem

250 32000 100 128

The corresponding four values from left to right are SEMMSL, SEMMNS, SEMOPM and SEMMNI. The modification method is:

# echo 610 86620 100 142 > / proc/sys/kernel/sem

# sysctl-w kernel.sem= "610 86620 142"

# echo "kernel.sem=610 86620 100142" > > / etc/sysctl.conf

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report