Oracle installation parameters and precautions!

Source: Internet
Author: User
How to Set kernel. shmmax in Linux

The following is an explanation of the Oracle document, http://download-west.oracle.com/doc...e.htm#sthref107

Shmmax available physical memory defines the maximum allowable size of one shared memory segment.

The shmmax setting shoshould be large enough to hold the entire SGA in one shared memory segment. A low setting can cause creation of multiple shared memory segments which may lead to performance degradation.

Shmmax indicates the maximum size of a single shared memory segment. If shmmax is set to 1 GB, SGA allocates 1.2 GB. When the instance is started, two shared memories are allocated to Oracle.
If the physical memory is 2 GB and Apache is still running on the DB server, the memory set in shmmax will also be used by Apache, if the allocated two shared memory segments are 2*1 GB for Oracle, or if the allocation is stopped only when 1.2 GB meets SGA requirements, is a part of other memory allocated to Oracle PGA and Apache?

A:
According to the Oracle document, when multiple (creation of multiple shared memory segments) shared memory segments need to be allocated, the performance may decrease.
If the occasional allocation requires two shared memory segments, the performance will not be greatly affected.

The shmmax Kernel Parameter defines the maximum value of a single shared memory segment. If this parameter is set to a smaller value than the Oracle SGA setting, SGA will be allocated with multiple shared memory segments. This may be a performance burden in a busy system and cause system problems.

Settings:
Some materials indicate that if the memory size is larger than 2 GB, the calculation is based on shmmax = Shmall * 1*1024 (Shmall = actual memory * 1024), and sometimes the calculation is based on 2 GB if the memory size is larger than 2 GB, shmall = 2097152 = 2048*1024, shmmax = Shmall * 1*1024 = 2147483648

Now the situation is that I install 9i according to the first statement, my server memory is 8g set, to the end of the ORA-27012ut of memory error, the database cannot start, and press the second will be okay, how can I set this value properly?

A:
For 32-bit Linux, the maximum shmmax value should not exceed 4294967295 regardless of the actual memory size.

For rh3, under normal circumstances, Oracle's SGA can only open to about GB (even if you have 8 GB memory), even after some adjustments, such as hugetlb, you can only set the SGA to <3G.

When setting SGA, Oracle will refer to kernel parameters of the system, such as shmmax.

Configure Linux Kernel Parameters
[Root @ myhost ~] # Vi/etc/sysctl. conf
# For Oracle
Kernel. shmmax = 1073741824 (change to half of the server memory, my server is 1 GB, so it is included, 1024*1024*1024)
Kernel. shmmni = 4096
Kernel. Shmall = 1073741824
Kernel. SEM = 250 32000 100 128
FS. File-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000

Modify the/etc/sysctl. conf file. The meanings of several parameters are as follows:
Kernel. shmmax indicates the maximum shared memory. If it is small, it can be determined based on the actual situation. Generally, it is half of the physical memory, but my VM is only 256 MB, so it is all included.
Shmmni indicates that the minimum shared memory is fixed at 4096kb.
Shmall indicates all memory sizes
The four parameters of SEM are semmsl in sequence: each user has the maximum number of semaphores, semmns: the maximum number of system semaphores, semopm: the number of calls to the semopm system each time, and semmni: the maximum number of system worker sets. These four parameters are fixed content sizes.
File-Max fixed size 65536
Ip_local_port_range indicates the port range, which is the specified content.

Oracle Linux configuration and environment variable Configuration:

Create oracle users and groups

Run the following commands as root: /usr/sbin/groupadd oinstall/usr/sbin/groupadd DBA/usr/sbin/useradd-m-g oinstall-g dba Oracle ID Oracle then set the password of the Oracle account: /usr/bin/passwd create a directory for Oracle 10 Gb software and database. Run the following command as root: mkdir-P/u01/APP/oraclemkdir-P/u02/oradatachown-r ORACLE: oinstall/u01/APP/Oracle/u02/oradatachown-r 775/u01/APP/Oracle/u02/oradata modify kernel parameters as root edit/etc/sysctl. CONF file. Add the following content: (available: CAT>/etc/sysctl. conf <EOF)
cat >> /etc/sysctl.conf <<EOF
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
EOF

/sbin/sysctl -p
Save and exit. Then run/sbin/sysctl-P to activate the change. Set shell restrictions for oracle users to edit the/etc/security/limits. conf file as root. Add the following content:

Cat>/etc/security/limits. conf <EOF
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
EOF
Then edit the/etc/PAM. d/login file. Add the following content:
Cat>/etc/PAM. d/login <EOF
Session required/lib/security/pam_limits.so
EOF
Oracle user environment variables are set to log on to the system as an oracle user. Edit the. bash_profile file. Add the following content: (set the specific value according to your own situation) export oracle_base =/u01/APP/oracleexport ORACLE_HOME = $ oracle_base/product/10 gexport oracle_sid = demoexport LD_LIBRARY_PATH = $ ORACLE_HOME/lib: /usr/libexport lc_ctype = en_US.UTF-8 and change Path = $ path: $ home/bin to Path = $ path: $ home/bin: $ ORACLE_HOME/bin
At this point, we were supposed to add the variable LD_LIBRARY_PATH to $ ORACLE_HOME/lib64. However, this is not necessary after experiments. Save and exit. Run the source. bash_profile command to make the environment variable take effect.

Note:
1. The above can be performed under root and Su, but if you want to perform the following actual installation, you must log out and log on to the real Oracle user for operations. If you really want to use Su-Oracle under root, you may need to add the: export display = IP: 0.0 variable.
2. in Linux installation, all development tools and original software development items in "development" and all subsequent "compatibility" options must be fully installed.
3. If you change the lc_ctype value to zh_cn.gb2312 and add the Lang parameter, the Oracle Installation interface will become Chinese!
4. After the installation is complete, the ora-12547: TNS: Lost contact error occurs in the database creation command: dbca. After looking at the Internet said that the 64-bit operating system is indeed 32-bit libaio, so please the system disk third installation: libaio-0.3.103-3.x86_64.rpm. However, after I have installed 64-bit libaio and relink all under $ ORACLE_HOME/bin, I still cannot. Then we deleted it:
Rpm-e libaio_devel **
Delete rpm-e libaio **, install libaio * 64 again, and run the command "relink all" on $ ORACLE_HOME/bin with the Oracle user. OK.
5. Whether it is a 64-bit operating system or a 32-bit operating system provided by Oracle, when installing Oracle10g R2, the same error occurs during database creation, that is:
TNS ora-12547: Lost contact error! In 32-bit Linux, I re-installed the libaio-0 with the third Disk. ****. run the following command under $ ORACLE_HOME/bin :. /relink all enables dbca to properly create databases.
Install Oracle

Download 10201_database_linux32.zip from the oracle.com. Decompress the package. Go to the decompressed directory. Run./runinstaller. By default

In the cpio format, run the following command after entering the directory:
Cpio-idmv <oracle10g64. cpio

The above experiment is in the environment: Oracle Enterprise Linux (64-bit) + Oracle 10gr2 (64-bit)
And: Oracle Enterprise Linux (32-bit) + Oracle 10g R2 (32-bit)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.