Oracle 10g RAC modify sga

Source: Internet
Author: User

Basic information:
Operating system version: CentOS-5.6 X86-64
Cpu: 2*12
Memory: 16 MB
Database Version: 10.2.0.4
Number of nodes: 2
When installing the system,/etc/sysctl. conf is not configured as optimal. In fact, for CentOS5.6-64, kernel. shmall and kernel. shmmax are the default values.
 
1. Restore the above two values to the default status
# Controls the maximum shared segment size, in bytes
Kernel. shmmax = 68719476736
 
# Controls the maximum number of shared memory segments, in pages
Kernel. shmall = 4294967296
2. The new kernel takes effect.
[Root @ 10-208 cron] # sysctl-p
Net. ipv4.ip _ forward = 0
Net. ipv4.conf. default. rp_filter = 1
Net. ipv4.conf. default. accept_source_route = 0
Kernel. sysrq = 0
Kernel. core_uses_pid = 1
Net. ipv4.tcp _ syncookies = 1
Kernel. msgmnb = 65536
Kernel. msgmax = 65536
Kernel. shmmax = 68719476736
Kernel. shmall = 4294967296
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Fs. file-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000
Net. core. rmem_default = 1048576
Net. core. rmem_max = 1048576
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
[Root @ 10-208 cron] #
 
3. Modify sga
Before modification, let's talk about the differences between sga and pga allocation for different types of databases (oltp and dss ).
Oltp: sga = total memory x 80% * 80%
Pga = total memory * 80% * 20%
Dss: sga = total memory * 80% * 50%
Sga = total memory * 80% * 50%
Personal Understanding: For oltp databases, the data volume is small and the concurrency is large. It is recommended that most of the data be stored in the memory, so the sga allocation is large. In general, oltp databases do not have to allocate too much memory because database sorting is not very large.
For the dss System, the data volume is usually very large, and it is unrealistic to put all the databases into the memory. However, the sorting of large data volumes is generally large, so the above allocation should be installed.
I am an oltp system, and all memory is allocated as follows:
Sga = 16G * 80% * 80% = 10.24G. I gave 10G
Pga = 16G * 80% * 20% = 2.56G. Here I gave 2G
1) modify the first node:
 
Alter system set sga_max_size = 10G scope = spfile sid = 'jscn1 ';
Alter system set sga_target = 10G scope = spfile sid = 'jscn1 ';
Shutdown immediate
Startup
 
2) After the first node is started, modify 2nd nodes:
 
Alter system set sga_max_size = 10G scope = spfile sid = 'jscn2 ';
Alter system set sga_target = 10G scope = spfile sid = 'jscn2 ';
Shutdown immediate
Startup
4. Make sure all services have been started.
 
[Root @ testrac1 ~] # Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. jscn. db application ONLINE testrac1
Ora... n1.inst application ONLINE testrac1
Ora... n2.inst application ONLINE testrac2
Ora... SM1.asm application ONLINE testrac1
Ora... C1.lsnr application ONLINE testrac1
Ora... ac1.gsd application ONLINE testrac1
Ora... ac1.ons application ONLINE testrac1
Ora... ac1.vip application ONLINE testrac1
Ora... SM2.asm application ONLINE testrac2
Ora... C2.lsnr application ONLINE testrac2
Ora... ac2.gsd application ONLINE testrac2
Ora... ac2.ons application ONLINE testrac2
Ora... ac2.vip application ONLINE testrac2


From RuleV5's column

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.