Adjustment of IPC resources, kernel. shmmax, and Oracle shared memory

Source: Internet
Author: User

(I) view and release IPC Resources

[Root @ David ~] # IPCS-M ------ shared memory segments -------- key shmid owner perms bytes nattch status ...... 0xbe3bb918 5439503 Oracle 640 419438592 22 [root @ David ~] # IPCS-m-I 5439503 shared memory segment shmid = 5439503uid = 501 gid = 502 cuid = 501 cgid = 502 mode = 0640 access_perms = 0640 bytes = 419438592 LPID = 5335 CPID = 5283 nattch = 21att_time = Sat Jun 29 18:50:06 2013 det_time = Sat Jun 29 18:51:07 2013 change_time = Sat Jun 29 18:49:33 2013 note: cuid: ID of the user who created the shared memory: ID of the group that created the shared memory: The last pidnattch that accessed the shared memory: the number of processes connected to the shared memory segment att_time: time of the last shmat () call det_time: Time of the last shmdt () call [shmdt Function release shared memory] change_time: Last time the shared memory segment was modified with shmctl () [shmctl Delete shared memory] [root @ David ~] # Ipcrm-M 5439503 [root @ David ~] # IPCS-M ------ shared memory segments -------- key shmid owner perms bytes nattch status ...... 0x00000000 5439503 Oracle 640 419438592 20 DEST the status changes to DEST, and the key changes to 0x00000000 [root @ David ~] # IPCS-m-I 5439503 shared memory segment shmid = 5439503uid = 501 gid = 502 cuid = 501 cgid = 502 mode = 01640 access_perms = 0640 bytes = 419438592 LPID = 5993 CPID = 5283 nattch = 19att_time = Sat Jun 29 19:29:42 2013 det_time = Sat Jun 29 19:29:42 2013 change_time = Sat Jun 29 18:49:33 2013

(Ii) shared memory


The shmmax Kernel Parameter defines the maximum value of a single shared memory segment.
SGA will be allocated with multiple shared memory segments, leading to performance degradation. To avoid multiple shared memory segments,
We can modify the shmmax kernel parameters so that SGA exists in a shared memory segment.

Modify the shmmax method:

1) directly edit/etc/sysctl. conf
2) sysctl-W kernel. shmmax = xxx
3) echo "kernel. shmmax = XXXX">/etc/sysctl. conf

After modification, sysctl-P

In Oracle, if the NUMA feature is enabled, the shared memory needs to be segmented, which causes many bugs.
When starting a feature, DBAs must understand the ins and outs of the feature and fully evaluate the impact of the feature!
Therefore, we generally:

Alter system set "_ enable_numa_optimization" = false scope = spfile;

However, the hidden parameter 11gr2 seems to have been abolished, and 11gr1 still exists.
This also tells us from the aspect that Oracle's Dongdong and we are more comfortable using R2.



(Iii) view the usage of Oracle shared memory

sys@ORCL> oradebug setmypidStatement processed.sys@ORCL> oradebug ipcInformation written to trace file.sys@ORCL> oradebug TRACEFILE_NAME/u01/app/oracle/admin/orcl/udump/orcl_ora_6161.trc

View the TRC file in combination with IPCS-m-I shmid. I will not go into details here.

By David Lin

2013-06-29

Good luck

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.