oracle11g 隐藏参数_oracle11G内核参数相关配置

  • Post author:
  • Post category:其他


Configuring Kernel Parameters

Verify that the kernel parameters shown in the following table

are set to values greater than or equal to the minimum value shown.

The procedure following the table describes how to verify and set

the values.

Parameter

Value

File

semmsl

semmns

semopm

semmni

250

32000

100

128

/proc/sys/kernel/sem

shmall

2097152

/proc/sys/kernel/shmall

shmmax

Minimum of

the following values:

Half the size of the physical memory

4GB – 1 byte

/proc/sys/kernel/shmmax

shmmni

4096

/proc/sys/kernel/shmmni

file-max

6815744

/proc/sys/fs/file-max

ip_local_port_range

Minimum:

9000

Maximum: 65500

Note: Ignore any Oracle Universal

Installer warnings related to this parameter.

/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

aio-max-nr

Maximum:

1048576

Note: This value limits concurrent

outstanding requests and should be set to avoid I/O subsystem

failures.

/sbin/sysctl

Note:

If the current value of any parameter is higher than the value

listed in this table, then do not change the value of that

parameter.

To view the current value specified for these kernel parameters,

and to change them if necessary:

Enter commands similar to the following to view the current

values of the kernel parameters:

Note:

Make a note of the current values and identify any values that you

must change.

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

file-max

#

/sbin/sysctl -a | grep file-max

ip_local_port_range

#

/sbin/sysctl -a | grep ip_local_port_range

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

If the value of any kernel parameter is different from the

recommended value, then complete the following steps:

Using any text editor, create or edit the

/etc/sysctl.conf file, and add or edit lines similar

to the following:

Note:

Include lines only for the kernel parameter values that you want to

change. For the semaphore parameters (kernel.sem), you

must specify all four values. However, if any of the current values

are larger than the minimum value, then specify the larger

value.

fs.file-max = 65536

kernel.shmall = 2097152

kernel.shmmax = 2147483648

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 = 1048576

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.

By specifying the values in the /etc/sysctl.conf

file, they persist when you restart the system.

Enter the following command to change the current values of the

kernel parameters:

# /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 /sbin/sysctl -a to confirm that

the values are set correctly.

On SUSE systems only, enter the following command to cause the

system to read the /etc/sysctl.conf file when it

restarts:

# /sbin/chkconfig boot.sysctl on

On SUSE systems only, you must enter the GID of the

oinstall group as the value for the parameter

/proc/sys/vm/hugetlb_shm_group. Doing this grants

members of oinstall a group permission to create

shared memory segments.

For example, where the oinstall group GID is

501:

# echo 501 > /proc/sys/vm/hugetlb_shm_group

After running this command, use vi to add the

following text to /etc/sysctl.conf, and enable the

boot.sysctl script to run on system restart:

vm.hugetlb_shm_group=501

Note:

Only one group can be defined as the

vm.hugetlb_shm_group.

After updating the values of kernel parameters in the

/etc/sysctl.conf file, either restart the computer, or

run the command sysctl -p to make the changes in the

/etc/sysctl.conf file available in the active kernel

memory.

Setting

Shell Limits for the oracle User

To improve the performance of the software, you must increase

the following shell limits for the oracle user:

Shell Limit

Item in limits.conf

Hard Limit

Maximum number of open file descriptors

nofile

65536

Maximum number of processes available to a single user

nproc

16384

To increase the shell limits:

Add the following lines in the

/etc/security/limits.conf file:

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

Note:

All the shell limit changes that you make to the

limits.conf file is updated into the file, and is

available the next time you log in to the system.



版权声明:本文为weixin_39620370原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。