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.
Note:
The kernel parameter and shell limit values in this
section are minimum values only. For production database systems, Oracle
recommends that you tune these values to optimize the performance of the
system. Refer to your operating system documentation for more information about
tuning kernel parameters.
Parameter
|
Minimum Value
|
File
|
semmsl
semmns
semopm
semmni
|
250
32000
100
128
|
/proc/sys/kernel/sem
|
shmall
|
2097152
|
/proc/sys/kernel/shmall
|
shmmax
|
Minimum: 536870912
Maximum: A value that is 1 byte less than the physical
memory
Recommended: More than half the physical memory
See My Oracle Support Note 567506.1 for additional
information about configuring shmmax.
|
/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
|
/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.
|
/proc/sys/fs/aio-max-nr
|
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 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.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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 = 1048586
By specifying the values in the /etc/sysctl.conf file, they persist
when you restart the system. However, on SUSE Linux Enterprise Server systems,
enter the following command to ensure that the system reads the /etc/sysctl.conf file when it
restarts:
# /sbin/chkconfig boot.sysctl on
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.conffile 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.
Check Resource Limits for the Oracle Software Installation
Users
For each installation software owner, check the resource
limits for installation, using the following recommended ranges:
Table 1 Installation Owner Resource Limit Recommended
Ranges
Resource Shell Limit
|
Resource
|
Soft Limit
|
Hard Limit
|
Open file descriptors
|
nofile
|
at least 1024
|
at least 65536
|
Number of processes available to a single user
|
nproc
|
at least 2047
|
at least 16384
|
Size of the stack segment of the process
|
stack
|
at least 10240 KB
|
at least 10240 KB, and at most 32768 KB
|
To check resource limits:
Log in as an installation owner.
Check the soft and hard limits for the file descriptor
setting. Ensure that the result is in the recommended range. For example:
$ ulimit -Sn
4096
$ ulimit -Hn
65536
Check the soft and hard limits for the number of processes
available to a user. Ensure that the result is in the recommended range. For
example:
$ ulimit -Su
2047
$ ulimit -Hu
16384
Check the soft limit for the stack setting. Ensure that
the result is in the recommended range. For example:
$ ulimit -Ss
10240
$ ulimit -Hs
32768
Repeat this procedure for each Oracle software
installation owner.
If necessary, update the resource
limits in the /etc/security/limits.conf configuration file for the installation owner. For example, add
the following lines to the /etc/security/limits.conf file:
oracle
soft nproc 2047
oracle
hard nproc 16384
oracle
soft nofile 1024
oracle
hard nofile 65536
oracle
soft stack 10240
Note:
- The values mentioned in this example are
illustrative and not actual values that must be added.
- When the limits.conf file
is changed, these changes take effect immediately. However, if the grid or
oracle users are logged in, then these changes do not take effect until
you log these users out and log them back in. You must do this before you
attempt to use these accounts to install.
No comments:
Post a Comment